示例#1
0
 /**
  * @Acl(ignore=true)
  */
 public function editPasswordAction()
 {
     $user = $this->_helper->service('user')->getCurrentUser();
     $form = new Admin_Form_EditPassword();
     $form->setMethod('POST');
     $request = $this->getRequest();
     if ($request->isPost() && $form->isValid($request->getPost())) {
         $this->_helper->service('user')->save($form->getValues(), $user);
         $this->_helper->flashMessenger(getGS('Password updated'));
         $this->_helper->redirector('edit-password', 'user', 'admin');
     }
     $this->view->form = $form;
 }
示例#2
0
 /**
  * @Acl(ignore=true)
  */
 public function editPasswordAction()
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $user = $this->_helper->service('user')->getCurrentUser();
     $form = new Admin_Form_EditPassword();
     $form->setMethod('POST');
     $request = $this->getRequest();
     if ($request->isPost() && $form->isValid($request->getPost())) {
         $this->_helper->service('user')->save($form->getValues(), $user);
         $this->_helper->flashMessenger($translator->trans('Password updated', array(), 'users'));
         $this->_helper->redirector('edit-password', 'user', 'admin');
     }
     $this->view->form = $form;
 }