Account component
Handles account related activities like logging in/out and recovering a lost password.
$_sessionKeys property
This contains an array of keys that should be set upon login and unset upon logout. Default is a single key ofuserid
.login($email, $pass)
Will attempt to log a user in using the logic in thevalidateLogin()
method of the account model. Email and password are trimmed automatically.logout()
Logs a user out.checkLogin($location = null)
Listens for login submission and handles it if found. This is meant to be used in the controller for the page receiving the login form action.$location
is optional, if omitted the user will return to the same page upon successful login.forgotPassword()
Emails the user their password if it is found, if not the script returns silently.forgotPassword()
expects $_POST['login_email']
to be present.