auth* : Add the overwritepassword method to the auth classes
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2054 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
24
auth.php
24
auth.php
@@ -86,7 +86,8 @@ class auth
|
|||||||
public function connect ()
|
public function connect ()
|
||||||
{
|
{
|
||||||
throw new Exception (dgettext("domframework",
|
throw new Exception (dgettext("domframework",
|
||||||
"No connect to authentication available"), 405);
|
"No connect to authentication available"),
|
||||||
|
405);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check if the email and password are correct
|
/** Check if the email and password are correct
|
||||||
@@ -97,14 +98,14 @@ class auth
|
|||||||
public function authentication ($email, $password)
|
public function authentication ($email, $password)
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new exception (dgettext("domframework",
|
||||||
"No authentication available"), 405);
|
"No authentication available"), 405);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return all the parameters recorded for the authenticate user */
|
/** Return all the parameters recorded for the authenticate user */
|
||||||
public function getdetails ()
|
public function getdetails ()
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new exception (dgettext("domframework",
|
||||||
"No getdetails available"), 405);
|
"No getdetails available"), 405);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Method to change the password
|
/** Method to change the password
|
||||||
@@ -114,7 +115,18 @@ class auth
|
|||||||
public function changepassword ($oldpassword, $newpassword)
|
public function changepassword ($oldpassword, $newpassword)
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new exception (dgettext("domframework",
|
||||||
"No password change available"), 405);
|
"No password change available"), 405);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Method to overwrite the password (without oldpassword check)
|
||||||
|
Must be reserved to the administrators. For the users, use changepassword
|
||||||
|
method
|
||||||
|
@param string $email the user identifier to select
|
||||||
|
@param string $newpassword The new password to be recorded */
|
||||||
|
public function overwritepassword ($email, $newpassword)
|
||||||
|
{
|
||||||
|
throw new exception (dgettext("domframework",
|
||||||
|
"No password overwrite available"), 405);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List all the users available in the database
|
/** List all the users available in the database
|
||||||
@@ -122,12 +134,12 @@ class auth
|
|||||||
public function listusers ()
|
public function listusers ()
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new exception (dgettext("domframework",
|
||||||
"No List User available"), 405);
|
"No List User available"), 405);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout ()
|
public function logout ()
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new exception (dgettext("domframework",
|
||||||
"No logout method available"), 405);
|
"No logout method available"), 405);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
authldap.php
12
authldap.php
@@ -105,6 +105,18 @@ class authldap extends auth
|
|||||||
"The password can't be change for LDAP users"), 405);
|
"The password can't be change for LDAP users"), 405);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Method to overwrite the password (without oldpassword check)
|
||||||
|
Must be reserved to the administrators. For the users, use changepassword
|
||||||
|
method
|
||||||
|
@param string $email the user identifier to select
|
||||||
|
@param string $newpassword The new password to be recorded */
|
||||||
|
public function overwritepassword ($email, $newpassword)
|
||||||
|
{
|
||||||
|
throw new exception (dgettext("domframework",
|
||||||
|
"The password can't be overwrite for LDAP users"),
|
||||||
|
405);
|
||||||
|
}
|
||||||
|
|
||||||
/** List all the users available in the database
|
/** List all the users available in the database
|
||||||
Return firstname, lastname, mail, with mail is an array */
|
Return firstname, lastname, mail, with mail is an array */
|
||||||
public function listusers ()
|
public function listusers ()
|
||||||
|
|||||||
@@ -53,6 +53,18 @@ class authsession extends auth
|
|||||||
405);
|
405);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Method to overwrite the password (without oldpassword check)
|
||||||
|
Must be reserved to the administrators. For the users, use changepassword
|
||||||
|
method
|
||||||
|
@param string $email the user identifier to select
|
||||||
|
@param string $newpassword The new password to be recorded */
|
||||||
|
public function overwritepassword ($email, $newpassword)
|
||||||
|
{
|
||||||
|
throw new exception (dgettext("domframework",
|
||||||
|
"The password can't be overwrite for SESSION users"),
|
||||||
|
405);
|
||||||
|
}
|
||||||
|
|
||||||
/** Save the datas in session */
|
/** Save the datas in session */
|
||||||
public function savedatas ($email, $password, $lastname, $firstname)
|
public function savedatas ($email, $password, $lastname, $firstname)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,4 +95,16 @@ class authsympa extends auth
|
|||||||
"The password can't be change for SYMPA users"),
|
"The password can't be change for SYMPA users"),
|
||||||
405);
|
405);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Method to overwrite the password (without oldpassword check)
|
||||||
|
Must be reserved to the administrators. For the users, use changepassword
|
||||||
|
method
|
||||||
|
@param string $email the user identifier to select
|
||||||
|
@param string $newpassword The new password to be recorded */
|
||||||
|
public function overwritepassword ($email, $newpassword)
|
||||||
|
{
|
||||||
|
throw new exception (dgettext("domframework",
|
||||||
|
"The password can't be overwrite for Sympa users"),
|
||||||
|
405);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user