Overview

Namespaces

  • Charcoal
    • Object
    • User
      • Acl

Classes

  • AbstractUser
  • Authenticator
  • Authorizer
  • AuthToken
  • AuthTokenMetadata
  • GenericUser

Interfaces

  • UserInterface
  • Overview
  • Namespace
  • Class

Interface UserInterface

User Interface, based on charcoal/object/content-interface.

Charcoal\User\UserInterface implements Charcoal\Object\ContentInterface

Direct known implementers

Charcoal\User\AbstractUser

Indirect known implementers

Charcoal\User\GenericUser
Namespace: Charcoal\User
Located at Charcoal/User/UserInterface.php
Methods summary
public static string
# sessionKey( )

Returns

string
public Charcoal\User\UserInterface
# setUsername( string $username )

Force a lowercase username

Force a lowercase username

Parameters

$username
The username (also the login name).

Returns

Charcoal\User\UserInterface
Chainable
public string
# username( )

The username is also used as login name and main identifier (key).

The username is also used as login name and main identifier (key).

Returns

string
public Charcoal\User\UserInterface
# setEmail( string $email )

Parameters

$email
The user email.

Returns

Charcoal\User\UserInterface
Chainable
public string
# email( )

Returns

string
public Charcoal\User\UserInterface
# setPassword( string|null $password )

Parameters

$password
The user password. Encrypted in storage.

Returns

Charcoal\User\UserInterface
Chainable
public string
# password( )

Returns

string
public Charcoal\User\UserInterface
# setActive( boolean $active )

Parameters

$active
The active flag.

Returns

Charcoal\User\UserInterface
Chainable

Implementation of

Charcoal\Object\ContentInterface::setActive()
public boolean
# active( )

Returns

boolean

Implementation of

Charcoal\Object\ContentInterface::active()
public Charcoal\User\UserInterface
# setLastLoginDate( string|DateTime $ts )

Parameters

$ts
The last login date.

Returns

Charcoal\User\UserInterface
Chainable
public DateTime
# lastLoginDate( )

Returns

DateTime
public Charcoal\User\UserInterface
# setLastLoginIp( string|integer|null $ip )

Parameters

$ip
The last login IP address.

Returns

Charcoal\User\UserInterface
Chainable
public string
# lastLoginIp( )

Get the last login IP in x.x.x.x format

Get the last login IP in x.x.x.x format

Returns

string
public Charcoal\User\UserInterface
# setLastPasswordDate( string|DateTime $ts )

Parameters

$ts
The last password date.

Returns

Charcoal\User\UserInterface
Chainable
public DateTime
# lastPasswordDate( )

Returns

DateTime
public Charcoal\User\UserInterface
# setLastPasswordIp( integer|string|null $ip )

Parameters

$ip
The last password IP.

Returns

Charcoal\User\UserInterface
Chainable
public string
# lastPasswordIp( )

Get the last password change IP in x.x.x.x format.

Get the last password change IP in x.x.x.x format.

Returns

string
public Charcoal\User\UserInterface
# setLoginToken( string $token )

Parameters

$token
The login token.

Returns

Charcoal\User\UserInterface
Chainable
public string
# loginToken( )

Returns

string
public Charcoal\User\UserInterface
# resetPassword( string $plainPassword )

Reset the password.

Reset the password.

Encrypt the password and re-save the object in the database. Also updates the last password date & ip.

Parameters

$plainPassword
The plain (non-encrypted) password to reset to.

Returns

Charcoal\User\UserInterface
Chainable
Methods inherited from Charcoal\Object\ContentInterface
created(), createdBy(), lastModified(), lastModifiedBy(), position(), setCreated(), setCreatedBy(), setLastModified(), setLastModifiedBy(), setPosition()
API documentation generated by ApiGen