Take user back to previous page after logging in?
问题 I have a controller called Accounts, with the views signin and signout. The corresponding functions look like this: function signin() { if (!empty($this->data)) { //handle login ... //save login to session $this->Session->write('Account', $data["Account"]); //redirect to previous page ??? } } function signout() { //delete login $this->Session->delete('Account'); //redirect to previous page ??? } If the user goes to accounts/signin it first checks to see if the form is submited if(!empty($this