我目前正在重置密码,正在通过电子邮件将以下链接发送给用户
http://localhost/realestateagencyadministration/users/reset/859be257b603ce278c42dca470be642a/48/
然后用户转到表单,控制器执行以下操作
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);
}
}
问题是当我提交它时会出现这样的错误
错误:在此服务器上找不到请求的地址“/realestateagencyadministration/users/reset/48”。
我该如何处理?