DomCI : Update the PHPDoc

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3273 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-12-08 15:57:56 +00:00
parent 3a004fbdc0
commit b102168208
4 changed files with 46 additions and 7 deletions

View File

@@ -12,8 +12,11 @@ class userssql extends users
{
/** The database connector */
private $dsn;
/** The user needed to connect to database */
private $username;
/** The password needed to connect to database */
private $password;
/** The optional drivers need by the database */
private $driver_options;
/** The db connector */
private $db;
@@ -24,13 +27,23 @@ class userssql extends users
Just allow chars ! */
public $tableprefix = "";
/** the fields */
/** The email field in the database */
public $fieldEmail = "email";
/** The firstname field in the database */
public $fieldFirstname = "firstname";
/** The lastname field in the database */
public $fieldLastname = "lastname";
/** The password field in the database */
public $fieldPassword = "password";
/** The lastchange field in the database */
public $fieldLastchange = "lastchange";
/** The constructor. Save the parameters to connect to the database
* @param string $dsn The DSN to connect
* @param string|null $username The username to connect
* @param string|null $password The password to connect
* @param array|null $driver_options The optional drivers parameters
*/
public function __construct ($dsn, $username=null, $password=null,
$driver_options=null)
{
@@ -85,8 +98,13 @@ class userssql extends users
}
/** Create a new user
If the password is not provided, create a default passwd (can be disable
password) */
* If the password is not provided, create a default passwd (can be disable
* password)
* @param string $email The email to add
* @param string $firstname The firstname to add
* @param string $lastname The lastname to add
* @param string|null $password The password of the user
*/
public function adduser ($email, $firstname, $lastname, $password=null)
{
if ($this->db === null)
@@ -105,7 +123,9 @@ class userssql extends users
$this->fieldPassword=>$password));
}
/** Delete a user */
/** Delete a user
* @param string $email The email to remove
*/
public function deluser ($email)
{
if ($this->db === null)
@@ -114,7 +134,12 @@ class userssql extends users
return $this->db->delete ($email);
}
/** Update a user */
/** Update a user
* @param string $oldemail The old email to modify
* @param string $newemail The new email to save
* @param string $firstname The firstname of the user
* @param string $lastname The lastname of the user
*/
public function updateuser ($oldemail, $newemail, $firstname, $lastname)
{
if ($this->db === null)
@@ -185,6 +210,8 @@ class userssql extends users
}
/** Check if the provided password is correctely associated to the email user
* @param string $email The email to authenticate
* @param string $password The user password (not crypted !)
*/
public function checkValidPassword ($email, $password)
{