当前位置: 首页>>代码示例>>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;未经允许,请勿转载。