コード例 #1
0
 /**
  * set the password for a given account
  *
  * @param  Tinebase_Model_FullUser  $_account the account
  * @param  string                   $_password the new password
  * @param  string                   $_passwordRepeat the new password again
  * @param  bool                     $_mustChange
  * @return void
  * 
  * @todo add must change pwd info to normal tine user accounts
  */
 public function setAccountPassword(Tinebase_Model_FullUser $_account, $_password, $_passwordRepeat, $_mustChange = null)
 {
     $this->checkRight('MANAGE_ACCOUNTS');
     if ($_password != $_passwordRepeat) {
         throw new Admin_Exception("Passwords don't match.");
     }
     $this->_userBackend->setPassword($_account, $_password, true, $_mustChange);
     Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' Set new password for user ' . $_account->accountLoginName . '. Must change:' . $_mustChange);
 }