コード例 #1
0
ファイル: User.php プロジェクト: krisrita/udo
 /**
  * 重置手机号
  */
 public function resetMobile($uid, $password, $mobileNew, $code)
 {
     if ($this->isUserExists($mobileNew)) {
         return Common_Error::ERROR_USER_EXISTS;
     }
     $errno = $this->checkPassword($uid, $password);
     if (true !== $errno) {
         return $errno;
     }
     $errno = $this->checkCode($mobileNew, $code);
     if (true !== $errno) {
         return $errno;
     }
     $tblUser = new DB_Howdo_User();
     return $tblUser->update($uid, array("mobile" => $mobileNew));
 }