Public Method Details |
User |
|
public void User( string $dbase, string $login, string $password, string $sessionID )
|
| |
Class constructor
|
| Parameter |
|
| string |
$dbase |
|
|
database to use |
|
|
| string |
$login |
|
|
XName login, may be null |
|
|
| string |
$password |
|
|
XName password |
|
|
| string |
$sessionID |
|
|
current session ID, if user already logged in |
|
| Returns |
void |
|
generateIDSession |
|
public string generateIDSession( )
|
| |
Call randomID() recursively until an ID not already in DB is found
|
| Returns |
string ID |
|
logout |
|
public int logout( string $idsession )
|
| |
Log out user by deleting entry from dns_session & reseting user vars
|
| Parameter |
|
| string |
$idsession |
|
|
session ID to reset |
|
| Returns |
int 1 if success, 0 if error |
|
userCreate |
|
public int userCreate( string $login, string $password, string $email )
|
| |
Create new user with given login, pass & email
|
| Parameter |
|
|
|
| string |
$password |
|
|
password |
|
|
|
| Returns |
int 1 if success, 0 if error |
|
changeLogin |
|
public int changeLogin( string $login )
|
| |
Change login name for current user
|
| Parameter |
|
|
| Returns |
int 1 if success, 0 if error |
|
updatePassword |
|
public int updatePassword( string $password )
|
| |
Change password for current user
|
| Parameter |
|
| string |
$password |
|
|
password |
|
| Returns |
int 1 if success, 0 if error |
|
listallzones |
|
public array listallzones( )
|
| |
list all zones owned by same user
|
| Returns |
array array of all zones/zonestypes owned by user or 0 if error |
|
Retrievemail |
|
public string Retrievemail( )
|
| |
Return email from current user
|
| Returns |
string email address or 0 if error |
|
getEmail |
|
public string getEmail( string $login )
|
| |
Return email from specified user, even if not logged in
|
| Parameter |
|
| string |
$login |
|
|
login to retrieve mail for |
|
| Returns |
string email address or 0 if error |
|
Changemail |
|
public int Changemail( string $email )
|
| |
Change email address for current user
|
| Parameter |
|
| string |
$email |
|
|
new email address |
|
| Returns |
int 1 if success, 0 if error |
|
Retrievepassword |
|
public string Retrievepassword( )
|
| |
Return password for current user
|
| Returns |
string current password or 0 if error |
|
generateIDEmail |
|
public string generateIDEmail( )
|
| |
Return generated ID for dns_waitingreply not already present (recursive)
|
| Returns |
string ID generated or 0 if error |
|
validateIDEmail |
|
public int validateIDEmail( string $id )
|
| |
Validate email corresponding to given ID (implies that user
have received email with validating ID)
|
| Parameter |
|
|
| Returns |
int 1 if success, 0 if error |
|
generateIDRecovery |
|
public string generateIDRecovery( )
|
| |
Generate unique ID for account recovery
|
| Returns |
string ID if success, 0 if error |
|
storeIDRecovery |
|
public int storeIDRecovery( string $login, string $id )
|
| |
store login and new ID (generated with generateIDRecovery)
in dns_recovery, to wait for request of lost password
|
| Parameter |
|
|
|
| string |
$id |
|
|
generated ID to store |
|
| Returns |
int 1 if success, 0 if error |
|
validateIDRecovery |
|
public int validateIDRecovery( string $id )
|
| |
Validate ID from dns_recovery, and modify current userid
to the one from dns_recovery
|
| Parameter |
|
|
| Returns |
int 1 if success, 0 if error |
|
RetrieveLogin |
|
public string RetrieveLogin( string $id )
|
| |
Return login matching given userid
|
| Parameter |
|
|
| Returns |
string login or 0 if error |
|