User
public class User
Method Summary | |
---|---|
void | __construct(str uid, mixed level, str fullname, str email, str comment) Creates a new instance of the class. |
void | changePassword(mixed password, mixed repeat, mixed current) Changes the user password. |
void | delete() Deletes the user object. |
void | deserialize(mixed string, bool phashonly) Deserializes a serialized object string into the user object. |
void | Returns the comment. |
void | getEMail() Returns the user's e-mail address. |
void | Returns the error state code of the last operation. |
void | Returns the user's full name. |
void | getLevel() Returns the user's permission level. |
void | getUID() Returns the user ID. |
void | read(mixed uid, bool phashonly) Reads user object from file. |
void | serialize(mixed password, mixed mode) Serializes the user object into a string. |
void | update(mixed uid, mixed password, mixed level, mixed fullname, mixed email, mixed comment, mixed mode) Writes user object to file. |
void | verifyPassword(mixed password) Verifies a user's password. |
public void __construct(str uid, mixed level, str fullname, str email, str comment)
Creates a new instance of the class. @param $uid User ID. Alternatively this will take a serialized user object. @param $level Permission level. @param $fullname Full name. @param $email e-mail address. @param $comment Comment.
public void changePassword(mixed password, mixed repeat, mixed current)
Changes the user password. @param $password New password. @return Error code state.
public void delete()
Deletes the user object. @return Error code state.
public void deserialize(mixed string, bool phashonly)
Deserializes a serialized object string into the user object. @param $string Serialized object string. @param $phashonly Forces to read only the password hash.
public void getComment()
Returns the comment. @return Comment.
public void getEMail()
Returns the user's e-mail address. @return e-mail address.
public void getErrorState()
Returns the error state code of the last operation. @return Error state code.
public void getFullName()
Returns the user's full name. @return Full name.
public void getLevel()
Returns the user's permission level. @return Permission level.
public void getUID()
Returns the user ID. @return User ID.
public void read(mixed uid, bool phashonly)
Reads user object from file. @param $uid User ID. @param $phashonly Forces to read only the password hash.
public void serialize(mixed password, mixed mode)
Serializes the user object into a string. @param $password Password. @param $mode Mode. @return Serialized object string.
public void update(mixed uid, mixed password, mixed level, mixed fullname, mixed email, mixed comment, mixed mode)
Writes user object to file. @param $uid User ID. @param $password Password. @param $level Permission level. @param $fullname Full name. @param $email e-mail address. @param $comment Comment. @param $mode Flags the operation mode (update/change password) @return Error code state.
public void verifyPassword(mixed password)
Verifies a user's password.
This class represents a system user.