當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application_Model_User::updateUser方法代碼示例

本文整理匯總了PHP中Application_Model_User::updateUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application_Model_User::updateUser方法的具體用法?PHP Application_Model_User::updateUser怎麽用?PHP Application_Model_User::updateUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Application_Model_User的用法示例。


在下文中一共展示了Application_Model_User::updateUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: parameterAction

 public function parameterAction()
 {
     $ns = new Zend_Session_Namespace('user');
     if (empty($ns->data)) {
         $this->_redirect($this->view->url(array('controller' => 'index', 'action' => 'error', 'type' => 'page'), null, true));
     }
     $this->view->headTitle('Gestion utilisateur');
     $ns = new Zend_Session_Namespace('user');
     if ($this->_getParam('type') == "apply") {
         $mdp = $_POST['password'];
         $firstname = $_POST['firstname'];
         $lastname = $_POST['lastname'];
         $mail = $_POST['mail'];
         $phone = $_POST['phone'];
         $address = $_POST['address'];
         $ville = $_POST['ville'];
         $cp = $_POST['cp'];
         $lastMdp = $_POST['last_password'];
         $user = new Application_Model_User();
         if ($lastMdp != null) {
             $val = $user->verifMdp($lastMdp, $ns->data['id_user']);
             if ($val) {
                 $this->_redirect($this->view->url(array('controller' => 'user', 'action' => 'modify', 'type' => 'error_password'), null, true));
             }
         }
         $stat = $user->updateUser($mdp, $firstname, $lastname, $mail, $phone, $address, $ville, $cp, $ns->data['id_user']);
         $ns->data = $stat;
         $this->view->message = "Modification sauvegard�";
     }
     $this->view->firstname = $ns->data['firstname_user'];
     $this->view->lastname = $ns->data['lastname_user'];
     $this->view->mail = $ns->data['mail_user'];
     $this->view->phone = $ns->data['phone_user'];
     $this->view->address = $ns->data['address_user'];
     $this->view->ville = $ns->data['ville_user'];
     $this->view->cp = $ns->data['codepostal_user'];
     $this->view->login_user = $ns->data['login_user'];
 }
開發者ID:nitishpeeroo,項目名稱:Telemaque,代碼行數:38,代碼來源:UserController.php

示例2: confirmationAction

 public function confirmationAction()
 {
     $code = $this->getRequest()->getParam("code");
     if (isset($code) && !empty($code)) {
         $modelValidation = new Application_Model_ValidationCode();
         $validation_code = $modelValidation->getbyCode($code, 0);
         if ($validation_code['is_confirmed'] == 0) {
             $modelValidation->updateValidationCode(array('is_confirmed' => 1), $validation_code['id_validation_code']);
             $userId = $validation_code['user_id'];
             $modelUser = new Application_Model_User();
             $modelUser->updateUser(array("isActive" => 1), $userId);
             $session = new Zend_Session_Namespace('Zend_auth');
             $session->user = $userId;
             $this->view->success = true;
         } else {
             $this->view->error = "Ce code est déjà confirmé";
         }
     } else {
         $this->view->error = "Erreur : Aucun code de validation";
     }
 }
開發者ID:mlacoste92,項目名稱:INM5151,代碼行數:21,代碼來源:IndexController.php


注:本文中的Application_Model_User::updateUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。