Handles account related activities like logging in/out and recovering a lost password.
$_sessionKeys propertyThis contains an array of keys that should be set upon login and unset upon logout. Default is a single key of
login($email, $pass)Will attempt to log a user in using the logic in the
validateLogin()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.
$locationis 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.
$_POST['login_email']to be present.