Tuskfish API V1.1.2
  • Package
  • Class

Packages

  • content
  • core
  • database
  • installation
  • security
  • user
  • utilities

Classes

  • TfUser

Class TfUser

Represents a user.

TfUser uses TfMagicMethods
Package: user
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Uses: trait TfMagicMethods Prevents direct setting of properties / unlisted properties.
Located at trust_path/libraries/tuskfish/class/TfUser.php

Methods summary

public
# __construct( TfValidator $validator )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.
public mixed|null
# __get( string $property )

Get the value of a property.

Get the value of a property.

Intercepts direct calls to access an object property. Disallow public access to sensitive properties (passwordHash).

Parameters

$property
Name of property.

Returns

mixed|null
$property Value of property if it is set; otherwise null.
public
# setAdminEmail( string $email )

Set the administrator's email address.

Set the administrator's email address.

Parameters

$email
Email of the administrator of this website.
public
# setId( integer $id )

Set the ID for this account.

Set the ID for this account.

Parameters

$id
ID of this user account.
public
# setLoginErrors( integer $number_of_errors )

Set the number of times this user has failed to correctly enter their password.

Set the number of times this user has failed to correctly enter their password.

Set this value to zero on successful login.

Parameters

$number_of_errors
Number of failed login attempts.
public
# setPasswordHash( string $hash )

Set the password hash for this user.

Set the password hash for this user.

Parameters

$hash
Hash of the user's password.
public
# setUserGroup( integer $group )

Set the privilege group for this user (not implemented).

Set the privilege group for this user (not implemented).

Parameters

$group
User group.
public
# setYubikeyId( string $id )

Set the ID of the primary yubikey hardware token for this account.

Set the ID of the primary yubikey hardware token for this account.

Parameters

$id
Yubikey ID.
public
# setYubikeyId2( string $id )

Set the ID of the secondary yubikey hardware token for this account.

Set the ID of the secondary yubikey hardware token for this account.

Parameters

$id
Yubikey ID.

Methods used from TfMagicMethods

__isset(), __set(), __unset()

Properties summary

protected $validator
#
protected $id
#
protected $adminEmail
#
protected $passwordHash
#
protected $userGroup
#
protected $yubikeyId
#
protected $yubikeyId2
#
protected $loginErrors
#

Magic properties

public TfValidator $validator

Instance of the Tuskfish data validator class.

public integer $id

ID of this user

public string $adminEmail

email address of this user

public string $passwordHash
public integer $userGroup

The privilege group this user belongs to (not implemented).

public string $yubikeyId

ID of the primary Yubikey hardware authentication token for this account.

public string $yubikeyId2

ID of the secondary Yubikey hardware authentication token for this account.

public string $loginErrors

Number of times the user has failed to enter their password correctly. It is reset to zero on successful login.

Tuskfish API V1.1.2 API documentation generated by ApiGen