public function changepasswordAction()
 {
     $r = $this->getRequest();
     $modDir = $this->getFrontController()->getModuleDirectory();
     require_once $modDir . '/components/MyAccount/Menu.php';
     $w = new MyAccount_Menu();
     $this->view->widget1 = $w;
     $auth = Zend_Auth::getInstance();
     $username = $auth->getIdentity()->username;
     $this->view->username = $username;
     $this->view->message = "";
     if ($r->isPost()) {
         $bpm = new Kutu_Core_Bpm_User();
         if ($bpm->changePassword($auth->getIdentity()->guid, $r->getParam('oldPassword'), $r->getParam('password'))) {
             $this->view->message = "Password was sucessfully changed.";
         } else {
             $this->view->message = "Old password was wrong. Please retry with correct password.";
         }
     }
 }
Ejemplo n.º 2
0
 public function deleteAction()
 {
     $r = $this->getRequest();
     $guid = $r->getParam('guid');
     $bpmUser = new Kutu_Core_Bpm_User();
     //check if $guid is an array
     if (is_array($guid)) {
         echo "this is array: ";
         foreach ($guid as $g) {
             $bpmUser->delete($g);
         }
     } else {
         $bpmUser->delete($guid);
     }
     print_r($guid);
     die;
 }
Ejemplo n.º 3
0
 public function forgetpasswordAction()
 {
     $this->_helper->layout()->setLayout('layout-lgs');
     $r = $this->getRequest();
     if ($r->isPost()) {
         $bpm = new Kutu_Core_Bpm_User();
         try {
             $bpm->forgetPassword($r->getParam('username'), $r->getParam('email'));
             $this->view->message = "Please check your email for the new password.";
         } catch (Exception $e) {
             $this->view->message = $e->getMessage();
         }
     }
 }