[英]Redirect is not working in cakephp after registration
function signup(){
if(!empty($this->data)){
if(isset($this->data['User']['password2']))
$this->data['User']['password2hashed'] = $this->
Auth->password($this->data['User']['password2']);
$this->User->create();
if($this->User->save($this->data)){
$this->Session->setFlash('Congratulatios, you have signed up');
$this->redirect('updateProfile');
}
{
$this->Session->setFlash('There was an error signing up, Please try again later');
$this->data= null;
}
}
}
Please help me, what am I doing wrong, I am new to cakephp, thanks 请帮助我,我在做什么错,我是Cakephp的新手,谢谢
$this->redirect('updateProfile'); //this is wrong
it must be: 一定是:
return $this->redirect("/users/updateProfile");
or: 要么:
return $this->redirect("updateProfile");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.