Exemple #1
0
 protected function getTokenData($token)
 {
     $tokendata = mfwMemcache::get(self::INSTALL_TOKEN_PREFIX . $token);
     $tokendata = json_decode($tokendata, true);
     if (!$tokendata) {
         return null;
     }
     if (strtotime($tokendata['expire']) < time()) {
         return null;
     }
     return $tokendata;
 }
Exemple #2
0
 public function executePassword_commit()
 {
     $key = mfwRequest::param('key');
     $pass = mfwRequest::param('password');
     $data = mfwMemcache::get($key);
     $user_pass = null;
     if (isset($data['mail'])) {
         $user_pass = UserPassDb::selectByEmail($data['mail']);
     }
     if (!$user_pass) {
         return $this->buildErrorPage('invalid key');
     }
     $user_pass->updatePasshash($pass);
     mfwMemcache::delete($key);
     return $this->build();
 }
Exemple #3
0
 protected function checkToken($token)
 {
     $pkg_id = mfwMemcache::get(self::TOKEN_KEY_PREFIX . $token);
     return $pkg_id == $this->package->getId();
 }