clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flUserAdapter

flUserAdapter Class

User authentication adaptor for using a local database to authenticate against. Also acts as base class for other adapters so that they can update local of data.

Direct known subclasses

flUserAdapterRemote

Package: fusionLib
Copyright: Copyright (c) 2013 - 2016 fusionLib. All rights reserved.
Located at system/libs/User/flUserAdapter.php

Methods summary

public
# __construct( flDb $db, flConfig $cfg = null, boolean $notifyEvents = true )

Construct the adapter.

Construct the adapter.

Parameters

$db
The system database object.
$cfg
The system configuration object.
$notifyEvents
Flags if to send user event notifications.
public array
# authenticate( string $ip, string $username, string $password, string $usernameEmail, boolean $updateAccessTime = true )

Authenticate the user with the given name and password.

Authenticate the user with the given name and password.

Parameters

$ip
The client IP address.
$username
The name of the user.
$password
The MD5 of the users password.
$usernameEmail
Select if $username holds a username 'username', an email address 'email', or null if unknown.
$updateAccessTime
true to update the last access time; else false.

Returns

array
Array of user data and auth state.
public array
# validate( integer $uid, string $data, string $signature, boolean $updateAccessTime = true )

Validate the user id, data payload and signature.

Validate the user id, data payload and signature.

Parameters

$uid
The user id to validate.
$data
The data to be verified.
$signature
The signature of the data.
$updateAccessTime
true to update the last access time; else false.

Returns

array
The array of user data and auth state.
public array
# regenerate( integer $uid )

Regenerate the authentication token.

Regenerate the authentication token.

Parameters

$uid
The ID of the user to regenerate.

Returns

array
Array of user data and state.
protected array
# _auth( string $where, array $params )

Internal function to perform authentication of the user against the database.

Internal function to perform authentication of the user against the database.

Parameters

$where
The where clause for matching the user.
$params
The parameters for the where clause.

Returns

array
Array of user data and state.
public boolean
# change( integer $uid, string $what, string $value )

Change a field.

Change a field.

Parameters

$uid
The ID of the user to update.
$what
What to change (passwd,username,email,tz, state,displayname,authkey,bio)
$value
The new value to set, for passwd is the MD5 of the password.

Returns

boolean
true if the change has been made; else false/null.
public boolean
# check( string $what, string $value )

Check for the presence of a username or email address.

Check for the presence of a username or email address.

Parameters

$what
What to check for (username, email)
$value
The value to check for.

Returns

boolean
true if a user exists that matches the check; else false.
public integer
# create( string $username, string $displayName, string $email, string $password, string $state, string $tz, integer $forceID = null, string $bio = '' )

Create a user within the system.

Create a user within the system.

Parameters

$username
The username or null if creating an unnamed user.
$displayName
The display name for the user.
$email
The users email address.
$password
The MD5 of the users password.
$state
The state to create the user in: 'active','disabled','pending'
$tz
The timezone string for the user.
$forceID
null to auto assign an ID or the ID to force, only valid for local accounts.
$bio
The users bio.

Returns

integer
The user id or 0 if the user could not be created.
public boolean
# setRoles( integer $uid, array $roles )

Set the roles for a user.

Set the roles for a user.

Parameters

$uid
The ID of the user to set the roles for.
$roles
Array of role names to set.

Returns

boolean
true if the roles were set; else false.
public array
# getRoles( integer $uid )

Get the names of the roles assigned to the user.

Get the names of the roles assigned to the user.

Parameters

$uid
The ID of the user to get the roles for.

Returns

array
Array of role names.
public array
# getInfo( integer $uid )

Get the information on a user.

Get the information on a user.

Parameters

$uid
The ID of the user to get.

Returns

array
The user information or false/null on error.
public boolean
# delete( integer $uid )

Delete the user.

Delete the user.

Parameters

$uid
The ID of the user to delete.

Returns

boolean
true if deleted; else false.
public boolean
# block( integer $uid, integer $blockedBy, integer $for, string $reason )

Block a user.

Block a user.

Parameters

$uid
The id of the user to block.
$blockedBy
The id of the user applying the block.
$for
The time in days to block the account for or 0 to block forever.
$reason
The reason for the block.

Returns

boolean
true if the block was applied; else false.
public array
# getBlockInfo( integer $uid )

Get the information about a block on a user.

Get the information about a block on a user.

Parameters

$uid
The id of the user to get the block information about.

Returns

array
Array holding the block information or null if the user is not blocked.

Properties summary

protected flDb $db

The database object.

The database object.

#
protected boolean $notifyEvents

Flags if not to send events.

Flags if not to send events.

#
clearFusionCMS 3.0.0 API documentation generated by ApiGen