本文整理汇总了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'];
}
示例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";
}
}