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