Skip to content
Snippets Groups Projects
Commit 6fa55c76 authored by Balazs Varga's avatar Balazs Varga
Browse files

AuthPlugin interface and documentation changes

parent cc35dc4e
No related branches found
No related tags found
No related merge requests found
...@@ -61,9 +61,10 @@ class ShibAuthPlugin extends AuthPlugin { ...@@ -61,9 +61,10 @@ class ShibAuthPlugin extends AuthPlugin {
* Modify options in the login template. * Modify options in the login template.
* *
* @param UserLoginTemplate $template * @param UserLoginTemplate $template
* @param String $type 'signup' or 'login'. Added in 1.16.
* @access public * @access public
*/ */
function modifyUITemplate( &$template ) { function modifyUITemplate( &$template, &$type ) {
$template->set( 'usedomain', false ); $template->set( 'usedomain', false );
} }
...@@ -147,11 +148,12 @@ class ShibAuthPlugin extends AuthPlugin { ...@@ -147,11 +148,12 @@ class ShibAuthPlugin extends AuthPlugin {
* Set the given password in the authentication database. * Set the given password in the authentication database.
* Return true if successful. * Return true if successful.
* *
* @param User $user
* @param string $password * @param string $password
* @return bool * @return bool
* @access public * @access public
*/ */
function setPassword( $password ) { function setPassword( $user, $password ) {
global $shib_pretend; global $shib_pretend;
return $shib_pretend; return $shib_pretend;
...@@ -184,12 +186,13 @@ class ShibAuthPlugin extends AuthPlugin { ...@@ -184,12 +186,13 @@ class ShibAuthPlugin extends AuthPlugin {
* Add a user to the external authentication database. * Add a user to the external authentication database.
* Return true if successful. * Return true if successful.
* *
* @param User $user * @param $user User: only the name should be assumed valid at this point
* @param string $password * @param $password String
* @return bool * @param $email String
* @access public * @param $realname String
* @return Boolean
*/ */
function addUser( $user, $password ) { public function addUser( $user, $password, $email = '', $realname = '' ) {
return false; return false;
} }
...@@ -215,10 +218,10 @@ class ShibAuthPlugin extends AuthPlugin { ...@@ -215,10 +218,10 @@ class ShibAuthPlugin extends AuthPlugin {
* The User object is passed by reference so it can be modified; don't * The User object is passed by reference so it can be modified; don't
* forget the & on your function declaration. * forget the & on your function declaration.
* *
* @param User $user * @param User $user User object.
* @access public * @param $autocreate Boolean: True if user is being autocreated on login
*/ */
function initUser( &$user, $autocreate ) { function initUser( &$user, $autocreate = false ) {
$this->updateUser($user); $this->updateUser($user);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment