User View code

Generic admin user class. This can be used for any logged in user or user related function.

package

CMS

since 0.6.1
license

GPL

Methods

__construct() 

Generic constructor. Runs the SetInitialValues fuction.

SetInitialValues() 

Sets object to some sane initial values

SetPassword(string $password) 

Encrypts and sets password for the User

Arguments

string $password

The plaintext password.

Save() 

Saves the user to the database. If no user_id is set, then a new record is created. If the uset_id is set, then the record is updated to all values in the User object.

Delete() 

Delete the record for this user from the database and resets all values to their initial values.

Properties

User id

id : integer

Type(s)

integer

Username

username : string

Type(s)

string

Password (md5 encoded)

password : string

Type(s)

string

Users First Name

firstname : string

Type(s)

string

Last Name

lastname : string

Type(s)

string

Users Email Address

email : string

Type(s)

string

Active Flag

active : boolean

Type(s)

boolean

Flag to tell whether user can login to admin panel

adminaccess : boolean

Type(s)

boolean