Esempio n. 1
0
 /**
  * @param integer $userId
  * @return BOL_UserResetPassword
  */
 public function getNewResetPassword($userId)
 {
     $resetPassword = new BOL_UserResetPassword();
     $resetPassword->setUserId($userId);
     $resetPassword->setExpirationTimeStamp(time() + self::PASSWORD_RESET_CODE_EXPIRATION_TIME);
     $resetPassword->setUpdateTimeStamp(time() + self::PASSWORD_RESET_CODE_UPDATE_TIME);
     $resetPassword->setCode(md5(UTIL_String::getRandomString(8, 5)));
     $this->resetPasswordDao->save($resetPassword);
     return $resetPassword;
 }
Esempio n. 2
0
function getNewResetPassword($userId)
{
    global $UserResetPassword;
    $newResetPassword = randomNumber();
    $resetPassword = new BOL_UserResetPassword();
    $resetPassword->setUserId($userId);
    $resetPassword->setExpirationTimeStamp(time() + 3600);
    $resetPassword->setUpdateTimeStamp(time() + 600);
    $resetPassword->setCode($newResetPassword);
    $UserResetPassword->save($resetPassword);
    return $resetPassword;
}
Esempio n. 3
0
 /**
  * @param integer $userId
  * @return BOL_UserResetPassword
  */
 public function getNewResetPassword($userId)
 {
     $resetPassword = new BOL_UserResetPassword();
     $resetPassword->setUserId($userId);
     $resetPassword->setExpirationTimeStamp(time() + 24 * 3600);
     $resetPassword->setCode(md5(UTIL_String::generatePassword(8, 5)));
     $this->resetPasswordDao->save($resetPassword);
     return $resetPassword;
 }