Add all the phpdocs to the domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
<?php
|
||||
/** DomFramework
|
||||
@package domframework
|
||||
@author Dominique Fournier <dominique@fournier38.fr> */
|
||||
|
||||
/** User authentication against SESSION */
|
||||
class authsession extends auth
|
||||
{
|
||||
/** Check if there is already a session or the user can not be authenticated
|
||||
*/
|
||||
function __construct ()
|
||||
{
|
||||
if (!isset ($_SESSION))
|
||||
@@ -14,7 +20,9 @@ class authsession extends auth
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/** Try to authenticate the email/password of the user */
|
||||
/** Try to authenticate the email/password of the user
|
||||
@param string $email Email to authenticate
|
||||
@param string $password Password to authenticate */
|
||||
public function authentication ($email, $password)
|
||||
{
|
||||
if (!isset ($_SESSION["auth"]["email"]) ||
|
||||
@@ -26,6 +34,7 @@ class authsession extends auth
|
||||
throw new Exception ("Bad password for '$email'", 401);
|
||||
}
|
||||
|
||||
/** Return all the parameters recorded for the authenticate user */
|
||||
public function getdetails ()
|
||||
{
|
||||
return array ("lastname"=>$_SESSION["auth"]["lastname"],
|
||||
@@ -33,6 +42,10 @@ class authsession extends auth
|
||||
"email"=>$_SESSION["auth"]["email"]);
|
||||
}
|
||||
|
||||
/** Method to change the password : unavailable in SESSION auth
|
||||
@param string $oldpassword The old password (to check if the user have the
|
||||
rights to change the password)
|
||||
@param string $newpassword The new password to be recorded */
|
||||
public function changepassword ($oldpassword, $newpassword)
|
||||
{
|
||||
throw new Exception (_("The password can't be change for SESSION users"),
|
||||
|
||||
Reference in New Issue
Block a user