Ryzom Account Management System  1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
WebUsers Class Reference

handles CMS/WWW related functions regarding user management & registration. More...

Inheritance diagram for WebUsers:
Users Users

Public Member Functions

 __construct ($UId=0)
 A constructor.
 set ($values)
 sets the object's attributes.
 checkLoginMatch ($username, $password)
 check if the login username and password match the db.
 getUId ()
 get uId attribute of the object.
 getUsername ()
 get login attribute of the object.
 getEmail ()
 get email attribute of the object.
 getInfo ()
 get basic info of the object.
 getReceiveMail ()
 get receiveMail attribute of the object.
 getLanguage ()
 get language attribute of the object.
 isLoggedIn ()
 check if the user is logged in.
 setPassword ($user, $pass)
 update the password.
 setEmail ($user, $mail)
 update the emailaddress.
 getUsers ()
 return all users.
 __construct ($UId=0)
 A constructor.
 set ($values)
 sets the object's attributes.
 checkLoginMatch ($username, $password)
 check if the login username and password match the db.
 getUId ()
 get uId attribute of the object.
 getUsername ()
 get login attribute of the object.
 getEmail ()
 get email attribute of the object.
 getInfo ()
 get basic info of the object.
 getReceiveMail ()
 get receiveMail attribute of the object.
 getLanguage ()
 get language attribute of the object.
 isLoggedIn ()
 check if the user is logged in.
 setPassword ($user, $pass)
 update the password.
 setEmail ($user, $mail)
 update the emailaddress.
 getUsers ()
 return all users.

Static Public Member Functions

static getId ($username)
 returns te id for a given username
static getIdFromEmail ($email)
 returns te id for a given emailaddress
static setReceiveMail ($user, $receivemail)
 update the setReceiveMail value in the db.
static setLanguage ($user, $language)
 update the language value in the db.
static getAllUsersQuery ()
 return the query that should get all users.
static createWebuser ($name, $pass, $mail)
 creates a webuser.
static getId ($username)
 returns te id for a given username
static getIdFromEmail ($email)
 returns te id for a given emailaddress
static setReceiveMail ($user, $receivemail)
 update the setReceiveMail value in the db.
static setLanguage ($user, $language)
 update the language value in the db.
static getAllUsersQuery ()
 return the query that should get all users.
static createWebuser ($name, $pass, $mail)
 creates a webuser.

Protected Member Functions

 checkUserNameExists ($username)
 function that checks if a username exists already or not.
 checkEmailExists ($email)
 function that checks if a email exists already or not.
 checkUserNameExists ($username)
 function that checks if a username exists already or not.
 checkEmailExists ($email)
 function that checks if a email exists already or not.

Private Attributes

 $uId
 The user id.
 $login
 The username.
 $email
 The email address.
 $firstname
 The users first name.
 $lastname
 The users last name.
 $gender
 The gender.
 $country
 2 letter word matching the country of the user
 $receiveMail
 configuration regarding if the user wants to receive email notifications or not.
 $language
 Language of the user.

Detailed Description

handles CMS/WWW related functions regarding user management & registration.

inherits from the Users class. The methods of this class have to be rewritten according to the CMS's functionality that you wish to use. The drupal_module has a webusers class of its own in the module itself.

Author:
Daan Janssens, mentored by Matthew Lagoe

Constructor & Destructor Documentation

__construct ( UId = 0)

A constructor.

loads the object with the UID, if none is given it will use 0.

Parameters:
$UIdthe UID of the user you want to instantiate.
__construct ( UId = 0)

A constructor.

loads the object with the UID, if none is given it will use 0.

Parameters:
$UIdthe UID of the user you want to instantiate.

Member Function Documentation

checkEmailExists ( email) [protected]

function that checks if a email exists already or not.

This function overrides the function of the base class.

Parameters:
$emailthe email address in question.
Returns:
string Info: Returns 0 if the email address is not in the web db, else a positive number is returned.

Reimplemented from Users.

checkEmailExists ( email) [protected]

function that checks if a email exists already or not.

This function overrides the function of the base class.

Parameters:
$emailthe email address in question.
Returns:
string Info: Returns 0 if the email address is not in the web db, else a positive number is returned.

Reimplemented from Users.

checkLoginMatch ( username,
password 
)

check if the login username and password match the db.

Parameters:
$usernamethe inserted username
$passwordthe inserted password (unhashed)
Returns:
the logged in user's db row as array if login was a success, else "fail" will be returned.

Reimplemented from Users.

checkLoginMatch ( username,
password 
)

check if the login username and password match the db.

Parameters:
$usernamethe inserted username
$passwordthe inserted password (unhashed)
Returns:
the logged in user's db row as array if login was a success, else "fail" will be returned.

Reimplemented from Users.

checkUserNameExists ( username) [protected]

function that checks if a username exists already or not.

This function overrides the function of the base class.

Parameters:
$usernamethe username in question
Returns:
string Info: Returns 0 if the user is not in the web db, else a positive number is returned.

Reimplemented from Users.

checkUserNameExists ( username) [protected]

function that checks if a username exists already or not.

This function overrides the function of the base class.

Parameters:
$usernamethe username in question
Returns:
string Info: Returns 0 if the user is not in the web db, else a positive number is returned.

Reimplemented from Users.

static createWebuser ( name,
pass,
mail 
) [static]

creates a webuser.

it will set the language matching to the language cookie setting and add it to the www/CMS's DB.

Parameters:
$namethe username
$passthe unhashed password
$mailthe email address
static createWebuser ( name,
pass,
mail 
) [static]

creates a webuser.

it will set the language matching to the language cookie setting and add it to the www/CMS's DB.

Parameters:
$namethe username
$passthe unhashed password
$mailthe email address
static getAllUsersQuery ( ) [static]

return the query that should get all users.

Returns:
string: the query to receive all users.
static getAllUsersQuery ( ) [static]

return the query that should get all users.

Returns:
string: the query to receive all users.
getEmail ( )

get email attribute of the object.

getEmail ( )

get email attribute of the object.

static getId ( username) [static]

returns te id for a given username

Parameters:
$usernamethe username
Returns:
the user's id linked to the username
static getId ( username) [static]

returns te id for a given username

Parameters:
$usernamethe username
Returns:
the user's id linked to the username
static getIdFromEmail ( email) [static]

returns te id for a given emailaddress

Parameters:
$emailthe emailaddress
Returns:
the user's id linked to the emailaddress
static getIdFromEmail ( email) [static]

returns te id for a given emailaddress

Parameters:
$emailthe emailaddress
Returns:
the user's id linked to the emailaddress
getInfo ( )

get basic info of the object.

Returns:
returns an array in the form of Array('FirstName' => $this->firstname, 'LastName' => $this->lastname, 'Gender' => $this->gender, 'Country' => $this->country, 'ReceiveMail' => $this->receiveMail)
getInfo ( )

get basic info of the object.

Returns:
returns an array in the form of Array('FirstName' => $this->firstname, 'LastName' => $this->lastname, 'Gender' => $this->gender, 'Country' => $this->country, 'ReceiveMail' => $this->receiveMail)

get language attribute of the object.

get language attribute of the object.

get receiveMail attribute of the object.

get receiveMail attribute of the object.

getUId ( )

get uId attribute of the object.

getUId ( )

get uId attribute of the object.

get login attribute of the object.

(username)

get login attribute of the object.

(username)

getUsers ( )

return all users.

Returns:
return an array of users
getUsers ( )

return all users.

Returns:
return an array of users

check if the user is logged in.

Returns:
true or false

check if the user is logged in.

Returns:
true or false
set ( values)

sets the object's attributes.

Parameters:
$valuesshould be an array.
set ( values)

sets the object's attributes.

Parameters:
$valuesshould be an array.
setEmail ( user,
mail 
)

update the emailaddress.

update the emailaddress in the shard + update the emailaddress in the www/CMS version.

Parameters:
$userthe username
$mailthe new emailaddress.
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
setEmail ( user,
mail 
)

update the emailaddress.

update the emailaddress in the shard + update the emailaddress in the www/CMS version.

Parameters:
$userthe username
$mailthe new emailaddress.
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
static setLanguage ( user,
language 
) [static]

update the language value in the db.

update the language in the www/CMS version.

Parameters:
$userthe username
$languagethe new language value.
static setLanguage ( user,
language 
) [static]

update the language value in the db.

update the language in the www/CMS version.

Parameters:
$userthe username
$languagethe new language value.
setPassword ( user,
pass 
)

update the password.

update the password in the shard + update the password in the www/CMS version.

Parameters:
$userthe username
$passthe new password.
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
setPassword ( user,
pass 
)

update the password.

update the password in the shard + update the password in the www/CMS version.

Parameters:
$userthe username
$passthe new password.
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
static setReceiveMail ( user,
receivemail 
) [static]

update the setReceiveMail value in the db.

update the receiveMail in the www/CMS version.

Parameters:
$userthe username
$receivemailthe receivemail setting .
static setReceiveMail ( user,
receivemail 
) [static]

update the setReceiveMail value in the db.

update the receiveMail in the www/CMS version.

Parameters:
$userthe username
$receivemailthe receivemail setting .

Field Documentation

$country [private]

2 letter word matching the country of the user

$email [private]

The email address.

$firstname [private]

The users first name.

$gender [private]

The gender.

$language [private]

Language of the user.

$lastname [private]

The users last name.

$login [private]

The username.

$receiveMail [private]

configuration regarding if the user wants to receive email notifications or not.

$uId [private]

The user id.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables