내가 현재있는주소 원래 URL이 2 PARAMS
http://localhost/realestateagencyadministration/users/reset/859be257b603ce278c42dca470be642a/48/
그런 다음 사용자가 간다 이메일로 사용자는 아래의 링크를 보내는 리셋 암호를하고있는 중이 야했기 때문에, 발견 요청한 나는 그렇게
같은 오류를 제공 제출할 때 형태와 컨트롤러는 다음Error: The requested address '/realestateagencyadministration/users/reset/48' was not found on this server.
public function reset($resetkey = null, $id = null) {
if (!$this->User->exists($id)) {
throw new NotFoundException(__('Invalid user'));
}
$result =$this->User->find('first', array('conditions' => array('User.id' => $id, 'User.resetKey' => "'" . $resetkey . "'")));
if ($result) {
$message = __('<b>Please check your reset link</b>');
$this->Session->setFlash($message);
}
if ($this->request->is('post')) {
if ($this->User->save()) {
$message = __('Your password has been reset');
$this->Session->setFlash($message);
} else {
$message = __('Something has gone wrong. Please try later or <b>sign up again</b>');
$this->Session->setFlash($message);
}
}
else {
$this->request->data = $this->User->findByIdAndResetkey($id, $resetkey);
$log = $this->User->getDataSource()->getLog(false, false);
debug($log);
}
}
문제가 않습니다 0
어떻게 처리해야합니까?
사용자가 'id'및 'resetKey'없이 페이지 만 재설정하면 어떻게됩니까? 아직도 못 찾니? – skywalker
@skywalker 아무 매개 변수도 전달하지 않을 때 얻을 수 없습니다. 다시 설정할 수 없습니다. UsersController :: reset() – Enzero
즉, reset이라는 이름의 두 가지 메소드가 있습니까? – skywalker