protected function checkAccount($mail) { if (isset($this->config['allowed_mailaddr_pattern'])) { // パターンマッチしたらOK if (preg_match($this->config['allowed_mailaddr_pattern'], $mail)) { return true; } } // user_passテーブルに登録されていたらOK $user = UserPassDb::selectByEmail($mail); return $user != null; }
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(); }