User
in package
Generic admin user class. This can be used for any logged in user or user related function.
Tags
Attributes
- #[AllowDynamicProperties]
Table of Contents
Properties
- $active : bool
- $adminaccess : bool
- $email : string
- $firstname : string
- $id : int
- $lastname : string
- $password : string
- $username : string
Methods
- __construct() : mixed
- Generic constructor. Runs the SetInitialValues fuction.
- Delete() : mixed
- Delete the record for this user from the database and resets all values to their initial values.
- Save() : mixed
- 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.
- SetInitialValues() : mixed
- Sets object to some sane initial values
- SetPassword() : mixed
- Encrypts and sets password for the User
Properties
$active
public
bool
$active
Active Flag
$adminaccess
public
bool
$adminaccess
Flag to tell whether user can login to admin panel
public
string
$email
Users Email Address
$firstname
public
string
$firstname
Users First Name
$id
public
int
$id
User id
$lastname
public
string
$lastname
Last Name
$password
public
string
$password
Password (md5 encoded)
$username
public
string
$username
Username
Methods
__construct()
Generic constructor. Runs the SetInitialValues fuction.
public
__construct() : mixed
Delete()
Delete the record for this user from the database and resets all values to their initial values.
public
Delete() : mixed
Tags
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.
public
Save() : mixed
Tags
SetInitialValues()
Sets object to some sane initial values
public
SetInitialValues() : mixed
Tags
SetPassword()
Encrypts and sets password for the User
public
SetPassword(string $password) : mixed
Parameters
- $password : string
-
The plaintext password.