user

Extends \expRecord

This is the class expRecord

subpackage

Models

package

Modules

Methods

__construct

__construct(null $params = null, boolean $get_assoc = true, boolean $get_attached = true) 
inherited
Throws
\ReflectionException

Arguments

$params

null

$get_assoc

boolean

$get_attached

boolean

after creating item

afterCreate() 
inherited

is run after deleting item, should delete associated items here if needed

afterDelete() 
inherited

after saving item

afterSave() 
inherited

after updating item

afterUpdate() 
inherited

after validating item

afterValidation() 
inherited

after validating item during creation

afterValidationOnCreate() 
inherited

after validating item during update

afterValidationOnUpdate() 
inherited

get objects this item belongs to ??

associateWith( $datatype,  $id) 
inherited

Type of associations has_and_belongs_to_many

Arguments

$datatype

$id

attach to item

attachItem( $item, string $subtype = '', boolean $replace = true) : boolean
inherited

Arguments

$item

$subtype

string

$replace

boolean

Response

boolean

authenticate

authenticate( $password) 

Arguments

$password

before creating item

beforeCreate() 
inherited

is run before deleting item

beforeDelete() 
inherited

before saving item

beforeSave() 
inherited

before updating item

beforeUpdate() 
inherited

before validating item

beforeValidation() 
inherited

before validating item during creation

beforeValidationOnCreate() 
inherited

before validating item during update

beforeValidationOnUpdate() 
inherited

Adds table fields as class properties to current "record" class.

build(mixed $params = array()) 
inherited

Loads Table schema data and creates new class properties based upon the fields in given table.

Additionally, if a record ID is given, that record is pulled and field values are also populated into class properties.

category

db_record

uses

Builds a data definition from existing table.

requires

$db

access

protected

final
PHPUnit

Not Defined

global

object $db

Arguments

$params

mixed

array or Object for table selection

check for what objects may be attached

checkForAttachableItems( $params) : boolean
inherited

Arguments

$params

Response

boolean

customerInfo

customerInfo() 

delete item

delete(string $where = '') : boolean
inherited

Arguments

$where

string

Response

boolean

Generate password hash

encryptPassword( $password, null $salt = null) : string
static

Arguments

$password

$salt

null

Response

string

find an item or items

find(string $range = 'all', null $where = null, null $order = null, null $limit = null, integer $limitstart, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array|integer
inherited

Arguments

$range

string

$where

null

$order

null

$limit

null

$limitstart

integer

$get_assoc

boolean

$get_attached

boolean

$except

array

$cascade_except

boolean

Response

array|integer

find an item by column

findBy( $column,  $value, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array
inherited

Arguments

$column

$value

$get_assoc

boolean

$get_attached

boolean

$except

array

$cascade_except

boolean

Response

array

find a value(s) by column

findValue(string $range = 'all', string $column, string $where = null, string $order = null, boolean $distinct = false) : array|boolean
inherited

Arguments

$range

string

$column

string

$where

string

$order

string

$distinct

boolean

Response

array|boolean

this function finds models that have this attachable item attached

findWhereAttachedTo( $content_type) : array
inherited

Arguments

$content_type

Response

array

exdoc Gets a list of all user accounts in the system. By giving different combinations of the two boolean arguments. three different lists of users can be returned. Returns a list of users, according to the two parameters passed in.

getAllUsers(boolean|integer $allow_admin = 1, boolean|integer $allow_normal = 1) : array
static

Arguments

$allow_admin

boolean|integer

Whether or not to include admin accounts in the returned list.

$allow_normal

boolean|integer

Whether or not to include normal accounts in the returned list.

Response

array

get item's associated objects

getAssociatedObjects(null $obj = null) : null
inherited

Type of associations has_one has_many has_and_belongs_to_many

Arguments

$obj

null

Response

null

gets associated objects for this model

getAssociatedObjectsForThisModel(array $except = array(), boolean $cascade_except = false) 
inherited

Type of associations has_extended_fields has_one has_many has_many_self has_and_belongs_to_many has_and_belongs_to_self

Arguments

$except

array

$cascade_except

boolean

get attached objects for this item

getAttachableItems() 
inherited

used for import/export

getAttachableItemTables() : array
inherited

Response

array

simple function to return the user's email

getEmailById(integer $id) : string
static
static

Arguments

$id

integer

Response

string

getGroupMemberships

getGroupMemberships() 

return the item poster

getPoster(null $display = null) : null|string
inherited

Arguments

$display

null

Response

null|string

getRealIpAddr

getRealIpAddr() 

getsToolbar

getsToolbar() 

return the item timestamp

getTimestamp(integer $type) : mixed
inherited

Arguments

$type

integer

Response

mixed

simple function to return the user's attribution based on system setting

getUserAttribution(integer $id, string $display = DISPLAY_ATTRIBUTION) : string
static
static

Arguments

$id

integer

$display

string

Response

string

exdoc This function pulls a user object from the subsystems storage mechanism, according to the email. For the default implementation, this is equivalent to a $db->selectObject() call, but it may not be the same for other implementations.

getUserByEmail(string $name) : \user
static

Returns a basic user object, and null if no user was found.

This function does NOT perform user caching like the getUserById function does. Multiple calls to retrieve the same user result in multiple calls to the database.

node

Model:User

Arguments

$name

string

The username of the user account to retrieve.

Response

\user

exdoc This function pulls a user object from the subsystems storage mechanism according to its ID. For the default implementation, this is equivalent to a $db->selectObject() call, but it may not be the same for other implementations.

getUserById(integer $uid) : \user
static

Returns a basic user object, and null if no user was found.

This function uses the exclusive global variable $SYS_USERS_CACHE to cache previously retrieved user accounts, so that subsequent requests for the same user object do not result in another trip to the database engine.

node

Model:User

Arguments

$uid

integer

The id of the user account to retrieve.

Response

\user

exdoc This function pulls a user object from the subsystems storage mechanism, according to the username. For the default implementation, this is equivalent to a $db->selectObject() call, but it may not be the same for other implementations.

getUserByName(string $name) : \user
static

Returns a basic user object, and null if no user was found.

This function does NOT perform user caching like the getUserById function does. Multiple calls to retrieve the same user result in multiple calls to the database.

node

Model:User

Arguments

$name

string

The username of the user account to retrieve.

Response

\user

getUserProfile

getUserProfile() 

This function determines a group global permission/restriction for this user

globalPerm( $perm) : boolean

Arguments

$perm

Response

boolean

Is the user an acting admin and NOT a super admin?

isActingAdmin() : boolean

Response

boolean

Is the user either a super admin or an acting admin?

isAdmin() : boolean

Response

boolean

Is the user logged on

isLoggedIn() : boolean

Response

boolean

is model content searchable?

isSearchable() : boolean
inherited static

Response

boolean

Is the user a super admin?

isSuperAdmin() : boolean

Response

boolean

Is the user the system (root) admin?

isSystemAdmin() : boolean

Response

boolean

isTempUser

isTempUser() 

create a many to many table relationship

makeManyToManyTablename( $assoc_table) : string
inherited

Arguments

$assoc_table

Response

string

make an sef_url for item

makeSefUrl() 
inherited

name of module for backwards compat with old modules

name() : string
inherited

Response

string

re-construct the item from the database

refresh() : boolean
inherited
Throws
\ReflectionException

Response

boolean

rerank items

rerank( $direction, string $where = '') 
inherited

Arguments

$direction

$where

string

save item

save(boolean $validate = false, boolean $force_no_revisions = false) 
inherited

Arguments

$validate

boolean

$force_no_revisions

boolean

save associated objects

saveAssociatedObjects() 
inherited

Type of associations has_one

setPassword

setPassword( $pass1,  $pass2) 

Arguments

$pass1

$pass2

update item

update(array|object $params = array()) 
inherited

Arguments

$params

array|object

updateLastLogin

updateLastLogin() 

validate item sef_url

validate() : boolean
inherited

Response

boolean

Properties

validates

validates : 

Type(s)

classinfo

classinfo : 
inherited

Type(s)

classname

classname : 
inherited

Type(s)

tablename

tablename : 
inherited

Type(s)

identifier

identifier : 
inherited

Type(s)

rank_by_field

rank_by_field : 
inherited

Type(s)

grouping_sql

grouping_sql : 
inherited

Type(s)

has_extended_fields

has_extended_fields : 
inherited

Type(s)

has_one

has_one : 
inherited

Type(s)

has_many

has_many : 
inherited

Type(s)

has_many_self

has_many_self : 
inherited

Type(s)

has_and_belongs_to_many

has_and_belongs_to_many : 
inherited

Type(s)

has_and_belongs_to_self

has_and_belongs_to_self : 
inherited

Type(s)

default_sort_field

default_sort_field : 
inherited

Type(s)

default_sort_direction

default_sort_direction : 
inherited

Type(s)

get_assoc_for

get_assoc_for : 
inherited

Type(s)

attachable_item_types

attachable_item_types : 
inherited

Type(s)

attachable_items_to_save

attachable_items_to_save : 
inherited

Type(s)

get_attachable_for

get_attachable_for : 
inherited

Type(s)

validate

validate : 
inherited

Type(s)

do_not_validate

do_not_validate : 
inherited

Type(s)

supports_revisions

supports_revisions : 
inherited

Type(s)

needs_approval

needs_approval : 
inherited

Type(s)