/**
  * try to reset password
  */
 public function testResetPassword()
 {
     $userArray = $this->testSaveAccount();
     $this->_json->resetPassword($userArray, 'password', false);
     $authResult = Tinebase_Auth::getInstance()->authenticate($this->objects['user']->accountLoginName, 'password');
     $this->assertTrue($authResult->isValid());
 }
Example #2
0
 /**
  * reset password for given account
  * - call Admin_Frontend_Json::resetPassword()
  *
  * @param  array   $account data of Tinebase_Model_FullUser or account id
  * @param  string  $password the new password
  * @param  bool    $mustChange
  * @return array
  */
 public function resetPassword($account, $password, $mustChange)
 {
     $adminJson = new Admin_Frontend_Json();
     return $adminJson->resetPassword($account, $password, (bool) $mustChange);
 }
 /**
  * reset password for given account
  * - call Admin_Frontend_Json::resetPassword()
  *
  * @param  array   $account data of Tinebase_Model_FullUser or account id
  * @param  string  $password the new password
  * @param  bool    $mustChange
  * @return array
  */
 public function resetPassword($account, $password, $mustChange)
 {
     $password = $this->_controller->getStudentPassword($password);
     $adminJson = new Admin_Frontend_Json();
     return $adminJson->resetPassword($account, $password, (bool) $mustChange);
 }
Example #4
0
 /**
  * try to reset password
  *
  */
 public function testResetPassword()
 {
     $this->_json->resetPassword($this->objects['user']->toArray(), 'password', FALSE);
     $authResult = Tinebase_Auth::getInstance()->authenticate($this->objects['user']->accountLoginName, 'password');
     $this->assertTrue($authResult->isValid());
 }