Commit cb404c25 authored by Penny Leach's avatar Penny Leach
Browse files

login() hook for authentication plugins

We've always had the ability for auth instances to define ->logout, this
adds ->login as well, along a very similar vein.
parent 5fe0e4df
......@@ -265,6 +265,18 @@ abstract class Auth {
return true;
* Called when a user is being logged in, after the main authentication routines.
* You can use $USER->login() to perform any additional tasks, for example
* to set a cookie that another application can read, or pull some data
* from somewhere.
* This method has no parameters and needs no return value
public function login() {
* Called when a user is being logged out, either by clicking a logout
* link, their session timing out or some other method where their session
......@@ -907,6 +907,10 @@ class LiveUser extends User {
// finally, after all is done, call the (maybe non existant) hook on their auth plugin
$authobj = AuthFactory::create($authinstance);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment