Methods

setActive()

setActive(boolean  $active) : \Charcoal\User\UserInterface

Parameters

boolean $active

The active flag.

Returns

\Charcoal\User\UserInterface

Chainable

active()

active() : boolean

Returns

boolean

setPosition()

setPosition(integer  $position) : \Charcoal\Object\Content

Parameters

integer $position

The position index.

Returns

\Charcoal\Object\Content

Chainable

position()

position() : integer

Returns

integer

setCreated()

setCreated(\DateTimeInterface|string|null  $created) : \Charcoal\Object\Content

Parameters

\DateTimeInterface|string|null $created

The created date.

Returns

\Charcoal\Object\Content

Chainable

created()

created() : \DateTimeInterface|null

Returns

\DateTimeInterface|null

setCreatedBy()

setCreatedBy(mixed  $createdBy) : \Charcoal\Object\Content

Parameters

mixed $createdBy

The author, at object creation.

Returns

\Charcoal\Object\Content

Chainable

createdBy()

createdBy() : mixed

Returns

mixed

setLastModified()

setLastModified(\DateTimeInterface|string|null  $lastModified) : \Charcoal\Object\Content

Parameters

\DateTimeInterface|string|null $lastModified

The last modified date.

Returns

\Charcoal\Object\Content

Chainable

lastModified()

lastModified() : \DateTimeInterface|null

Returns

\DateTimeInterface|null

setLastModifiedBy()

setLastModifiedBy(mixed  $lastModifiedBy) : \Charcoal\Object\Content

Parameters

mixed $lastModifiedBy

The author, at object modificaition (update).

Returns

\Charcoal\Object\Content

Chainable

lastModifiedBy()

lastModifiedBy() : mixed

Returns

mixed

sessionKey()

sessionKey() : string

Returns

string

setUsername()

setUsername(string  $username) : \Charcoal\User\UserInterface

Force a lowercase username

Parameters

string $username

The username (also the login name).

Returns

\Charcoal\User\UserInterface

Chainable

username()

username() : string

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

Returns

string

setEmail()

setEmail(string  $email) : \Charcoal\User\UserInterface

Parameters

string $email

The user email.

Returns

\Charcoal\User\UserInterface

Chainable

email()

email() : string

Returns

string

setPassword()

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

Parameters

string|null $password

The user password. Encrypted in storage.

Returns

\Charcoal\User\UserInterface

Chainable

password()

password() : string

Returns

string

setLastLoginDate()

setLastLoginDate(string|\Charcoal\User\DateTime  $ts) : \Charcoal\User\UserInterface

Parameters

string|\Charcoal\User\DateTime $ts

The last login date.

Returns

\Charcoal\User\UserInterface

Chainable

lastLoginDate()

lastLoginDate() : \Charcoal\User\DateTime

Returns

\Charcoal\User\DateTime

setLastLoginIp()

setLastLoginIp(string|integer|null  $ip) : \Charcoal\User\UserInterface

Parameters

string|integer|null $ip

The last login IP address.

Returns

\Charcoal\User\UserInterface

Chainable

lastLoginIp()

lastLoginIp() : string

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

Returns

string

setLastPasswordDate()

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

Parameters

string|\Charcoal\User\DateTime $ts

The last password date.

Returns

\Charcoal\User\UserInterface

Chainable

lastPasswordDate()

lastPasswordDate() : \Charcoal\User\DateTime

Returns

\Charcoal\User\DateTime

setLastPasswordIp()

setLastPasswordIp(integer|string|null  $ip) : \Charcoal\User\UserInterface

Parameters

integer|string|null $ip

The last password IP.

Returns

\Charcoal\User\UserInterface

Chainable

lastPasswordIp()

lastPasswordIp() : string

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

Returns

string

setLoginToken()

setLoginToken(string  $token) : \Charcoal\User\UserInterface

Parameters

string $token

The login token.

Returns

\Charcoal\User\UserInterface

Chainable

loginToken()

loginToken() : string

Returns

string

resetPassword()

resetPassword(string  $plainPassword) : \Charcoal\User\UserInterface

Reset the password.

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

Parameters

string $plainPassword

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

Returns

\Charcoal\User\UserInterface

Chainable