Documentation

UserUtility
in package

User utility.

Table of Contents

Methods

findUserByCredentials()  : User
Find a user.
getUserSubject()  : string
Get the subject of a user.

Methods

findUserByCredentials()

Find a user.

public static findUserByCredentials(string $username, string $password[, string $field = 'email' ]) : User
Parameters
$username : string

The username of the user.

$password : string

The password of the user.

$field : string = 'email'

The name of the database column for unique user identifiers. The default value is 'email'.

Return values
User

The user. If not found, null is returned.

getUserSubject()

Get the subject of a user.

public static getUserSubject([User $user = null ]) : string
Parameters
$user : User = null

The user.

Return values
string

The subject (= unique identifier) of the user.


        
On this page

Search results