Method |
Description |
|
__construct ( array $paramarray = [] ) |
Constructor for the User class |
|
__get ( string $name ) : mixed |
Capture requests for the info object so that it can be initialized properly when
the constructor is bypassed (see PDO::FETCH_CLASS pecularities). Passes all other
requests to parent. |
|
add_to_group ( integer | string | UserGroup $group ) : null |
function add_to_group |
|
anonymous ( ) : object |
Build and return the anonymous user |
|
authenticate ( string $who, string $pw ) : User | boolean |
Check a user's credentials to see if they are legit
-- calls all auth plugins BEFORE checking local database. |
|
can ( string $token, string $access = 'any' ) : boolean |
Determine if a user has a specific token permission |
|
can_any ( array $token_access = [] ) : boolean |
Determine if a user has any of a set of tokens |
|
cannot ( string $token ) : boolean |
Determine if a user has been denied access to a specific token |
|
commenter ( ) : Array |
Returns an array of information about the commenter
If this is a logged-in user, then return details from their user profile. |
|
content_type ( ) : array |
Returns the content type of the object instance |
|
count_posts ( $status = false ) : integer |
Returns the number of posts written by this user |
|
create ( $paramarray ) : User |
Creates a new user object and saves it to the database |
|
default_fields ( ) : array |
Get default fields for this record. |
|
delete ( ) |
Delete a user account |
|
deny ( $tokens ) |
Deny permissions to one or more tokens to this user |
|
field_load ( string $key ) : mixed |
Loads form values from an object |
|
field_save ( string $key, mixed $value ) |
Stores a form value into the object |
|
forget ( boolean $redirect = true ) |
Delete the user id from the session |
|
get ( mixed $who ) : object |
Fetch a user from the database by name, ID, or email address. |
|
get_by_email ( string $email ) : User |
Select a user from the database by its email address |
|
get_by_id ( integer $id ) : User |
Select a user from the database by its id |
|
get_by_name ( string $username ) : User |
Select a user from the database by its username |
|
get_id ( mixed $user ) : integer |
Return the id of a user |
|
get_url_args ( ) : array |
Returns a set of properties used by URL::get to create URLs |
|
grant ( $tokens, $access = 'full' ) |
Assign permissions to one or more new tokens to this user |
|
identify ( ) : User |
Check for the existence of a cookie, and return a user object of the user, if successful |
|
in_group ( integer | string $group ) : boolean |
function in_group
Whether or not this user is is in the specified group |
|
insert ( ) |
Save a new user to the users table |
|
remember ( ) |
Save the user id into the session |
|
remove_from_group ( integer | string | UserGroup $group ) : null |
function remove_from_group
removes this user from a group |
|
revoke ( $tokens ) |
Remove permissions to one or more tokens from a user |
|
update ( ) |
Updates an existing user in the users table |
|