CMS Made Simple API

User
in package

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

Tags
since
0.6.1
license

GPL

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

$adminaccess

public bool $adminaccess

Flag to tell whether user can login to admin panel

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
returns

mixed If successful, true. If it fails, false.

since
0.6.1

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
returns

mixed If successful, true. If it fails, false.

since
0.6.1

SetInitialValues()

Sets object to some sane initial values

public SetInitialValues() : mixed
Tags
since
0.6.1

SetPassword()

Encrypts and sets password for the User

public SetPassword(string $password) : mixed
Parameters
$password : string

The plaintext password.

Tags
since
0.6.1

        
On this page

Search results