users
[ class tree: users ] [ index: users ] [ all elements ]

Class: RolePermUser

Source Location: /users/RolePermUser.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyContent
         |
         --LibertyMime
            |
            --BitUser
               |
               --RolePermUser

Class that holds all information for a given user


Author(s):

Version:

  • $Revision$

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: BitUser

BitUser::BitUser()
Constructor - will automatically load all relevant data if passed a user string
BitUser::answerCaptcha()
answerCaptcha
BitUser::ban()
ban sets the user account status to -201 suspended
BitUser::canCustomizeLayout()
canCustomizeLayout check if a user can customise their layout
BitUser::canCustomizeTheme()
canCustomizeTheme check if a user can customise their theme
BitUser::changeUserEmail()
changeUserEmail
BitUser::confirmRegistration()
confirmRegistration
BitUser::countSessions()
countSessions
BitUser::createTempPassword()
createTempPassword
BitUser::defaults()
defaults set a default set of preferences in mPrefs for new users
BitUser::exportHash()
Create an export hash from the data
BitUser::expunge()
expunge removes user and associated private data
BitUser::expungeFavorite()
BitUser::expungeWatch()
expungeWatch
BitUser::generateChallenge()
generateChallenge
BitUser::genPass()
genPass generate random password
BitUser::getCacheKey()
BitUser::getDisplayLink()
getDisplayLink
BitUser::getDisplayName()
Get user information for a particular user
BitUser::getDisplayNameFromHash()
Get user information for a particular user
BitUser::getDisplayUrlFromHash()
getDisplayUrl
BitUser::getDomain()
getDomain
BitUser::getEventWatches()
getEventWatches
BitUser::getFavorites()
getFavorites
BitUser::getList()
getList get a list of users
BitUser::getRenderFile()
getRenderFile Returns include file that will
BitUser::getRoles()
getRoles
BitUser::getSelectionList()
getSelectionList get a list of users that can be used in dropdown lists in forms to choose from
BitUser::getSiteCookieName()
BitUser::getSmtpResponse()
getSmtpResponse
BitUser::getSortModeFields()
Validate inbound sort_mode parameter
BitUser::getThumbnailUrl()
getThumbnailUrl
BitUser::getTitle()
getTitle
BitUser::getUserActivity()
getUserActivity
BitUser::getUserAttachments()
getUserAttachments
BitUser::getUserDomain()
getUserDomain
BitUser::getUserId()
getUserId
BitUser::getUserIdFromCookieHash()
getByHash get user from cookie hash
BitUser::getUserInfo()
getUserInfo will fetch the user info of a given user
BitUser::getUserObject()
BitUser::getUserPreference()
getUserPreference
BitUser::getWatches()
getWatches
BitUser::get_event_watches()
get_event_watches
BitUser::get_watches_events()
get_watches_events
BitUser::hasFavorite()
BitUser::importUser()
Imports a user record from csv file This is a admin specific function
BitUser::isAdmin()
isAdmin "PURE VIRTUAL BASE FUNCTION";
BitUser::isCacheableClass()
BitUser::isCacheableObject()
Determines if a user object is cacheable. Out of paranoia, admin's are never cached.
BitUser::isPasswordDue()
isPasswordDue work out if a user has to change their password
BitUser::isRegistered()
isRegistered
BitUser::isUserPrivate()
isUserPublic Determine if an arbitrary user can be viewed by non-permissioned users.
BitUser::isValid()
isValid
BitUser::load()
load - loads all settings & preferences for this user
BitUser::login()
login
BitUser::logout()
logout
BitUser::lookupHomepage()
lookupHomepage
BitUser::preRegisterVerify()
preRegisterVerify
BitUser::purgeAvatar()
purgeAvatar
BitUser::purgeImage()
purgeImage
BitUser::purgeLogo()
purgeLogo
BitUser::purgePortrait()
purgePortrait
BitUser::register()
register - will handle everything necessary for registering a user and sending appropriate emails, etc.
BitUser::remove_user_watch_by_hash()
remove_user_watch_by_hash
BitUser::sendSessionCookie()
BitUser::store()
store
BitUser::storeAvatar()
storeAvatar
BitUser::storeFavorite()
storeFavorite
BitUser::storeImages()
storeImages will store any user images - please note that uploaded files have to be in predefined keys in $_FILES
BitUser::storeLogo()
storeLogo
BitUser::storePassword()
storePassword
BitUser::storePortrait()
storePortrait
BitUser::storeUserImage()
storeUserImage
BitUser::storeWatch()
storeWatch
BitUser::unban()
ban unban the user
BitUser::updateLastLogin()
updateLastLogin
BitUser::updateSession()
updateSession
BitUser::userCollection()
userCollection
BitUser::userExists()
userExists
BitUser::validate()
validate
BitUser::verify()
verify store hash
BitUser::verifyAnonEmail()
verifyAnonEmail
BitUser::verifyCaptcha()
verifyCaptcha
BitUser::verifyEmail()
verifyEmail
BitUser::verifyMX()
verifyMX
BitUser::verifyPasswordFormat()
verifyPasswordFormat
BitUser::verifyRegistered()
verifyRegistered
BitUser::verifyTicket()
verifyTicket
BitUser::verifyUserImport()
Verify and validate the data when importing a user record from csv file This is a admin specific function

Class: LibertyMime

LibertyMime::addDownloadHit()
Increment the item hit flag by 1
LibertyMime::getThumbnailUrl()
getThumbnailUrl will fetch the primary thumbnail for a given content. If nothing has been set, it will fetch the last thumbnail it can find.
LibertyMime::load()
load the attachments for a given content id and then stuff them in mStorage
LibertyMime::pluginStore()
pluginStore will use a given plugin to store uploaded file data
LibertyMime::store()
Store a new upload
LibertyMime::updateAttachmentParams()
updateAttachmentParams will update attachment parameters
LibertyMime::verify()
Verify content that is about to be stored
LibertyMime::verifyAttachment()
verifyAttachment will perform a generic check if a file is valid for processing

Class: LibertyContent

LibertyContent::__construct()
Construct an empty LibertyBase object with a blank permissions array
LibertyContent::addHit()
Increment the content item hit flag by 1
LibertyContent::checkContentPermission()
Check is a user has permission to access the object
LibertyContent::convertQueryHash()
Convert a built up pQueryHash into a single query string and set of bind variables.
LibertyContent::exportHash()
Create an export hash from the data
LibertyContent::exportList()
LibertyContent::expunge()
Delete content object and all related records
LibertyContent::expungeComments()
Delete comment entries relating to the content object
LibertyContent::expungeContentPermissions()
Expunge Content Permissions
LibertyContent::expungeVersion()
Removes a specific version of a page
LibertyContent::generateDescription()
Attempt to create a brief description of this object, most useful for <meta name="description" />
LibertyContent::generateKeywords()
Attempt to create a collection of relevant words about this object, most useful for <meta name="keywords" />
LibertyContent::getAliases()
Get array of aliases for this content object
LibertyContent::getCacheKey()
LibertyContent::getContentDescription()
Return content type description for this content object.
LibertyContent::getContentId()
Access a content item content_id
LibertyContent::getContentListPermissionsSql()
getContentListPermissionsSql
LibertyContent::getContentPermissionsList()
Load all permissions assigned to a given object.
LibertyContent::getContentPermissionsSql()
getContentPermissionsSql
LibertyContent::getContentType()
Access a content item type GUID
LibertyContent::getContentTypeDescription()
getContentTypeDescription
LibertyContent::getContentTypeName()
Get the display name of the content type
LibertyContent::getContentWithPermissionsList()
Get a list of content with permissions
LibertyContent::getDisplayLink()
Pure virtual function that returns link to display a piece of content
LibertyContent::getDisplayUri()
Not-so-pure virtual function that returns fully qualified URI to a piece of content
LibertyContent::getDisplayUriFromHash()
Not-so-pure virtual function that returns fully qualified URI to a piece of content
LibertyContent::getDisplayUrlFromHash()
Not-so-pure virtual function that returns Request_URI to a piece of content
LibertyContent::getHistory()
Get complete set of historical data in order to display a given wiki page version
LibertyContent::getHistoryCount()
Get count of the number of historic records for the page
LibertyContent::getHits()
Get Hits and Last Hit
LibertyContent::getLibertySql()
Default liberty sql for joining a content object table to liberty.
LibertyContent::getPreference()
Returns the content preferences value for the passed in key.
LibertyContent::getRenderFile()
Pure virtual function that returns the include file that should render a page of content of this type
LibertyContent::getServicesSql()
Set up SQL strings for services used by the object
LibertyContent::getServicesSql2()
getServicesSql2
LibertyContent::getTitle()
Create the generic title for a content item
LibertyContent::getTitleFromHash()
Create the generic title for a content item
LibertyContent::getUserPermissions()
Get specific permissions for the specified user for this content
LibertyContent::getViewTemplate()
returns a path to the template type requested this is intended for package override. while not a requirement please use a naming convention of center_<action>_<content_type_guid>.tpl for new tpls
LibertyContent::hasAdminPermission()
Determine if current user has the ability to administer this type of content
LibertyContent::hasCreatePermission()
Determine if current user has the ability to craete this type of content
LibertyContent::hasEditPermission()
Deprecated, use hasUpdatePermission
LibertyContent::hasExpungePermission()
Determine if current user has the ability to delete/expunge this type of content
LibertyContent::hasPostCommentsPermission()
Determine if current user has the ability to post comments to this type of content
LibertyContent::hasService()
check if a service is active for this content type
LibertyContent::hasUpdatePermission()
Determine if current user has the ability to edit this type of content
LibertyContent::hasUserPermission()
Function that determines if this content specified permission for the current gBitUser.
LibertyContent::hasUserPermissions()
Check to see if the loaded content has individually assigned permissions
LibertyContent::hasViewPermission()
Determine if current user has the ability to view this type of content Note that this will always return TRUE if you haven't set the mViewContentPerm in your class
LibertyContent::invokeServices()
Set up access to services used by the object
LibertyContent::isAdminable()
Check permissions to establish if user has permission to admin the object
LibertyContent::isCacheableClass()
LibertyContent::isCacheableObject()
LibertyContent::isContentType()
Check if content matches content type GUID - must also be a valid content object, it will not work for generic content class
LibertyContent::isEditable()
Check permissions to establish if user has permission to edit the object
LibertyContent::isExcludedPermission()
Check to see if this permission is already in the global permissions table.
LibertyContent::isOwner()
Check user_id to establish if the object that has been loaded was created by the current user
LibertyContent::isServiceRequired()
check if a service is required for this content type
LibertyContent::isValid()
Check mContentId to establish if the object has been loaded with a valid record
LibertyContent::isViewable()
Check permissions to establish if user has permission to view the object
LibertyContent::load()
load Assume a derived class has joined on the liberty_content table, and loaded it's columns already.
LibertyContent::loadPreferences()
loadPreferences of the currently loaded object or pass in to get preferences of a specific content_id
LibertyContent::registerContentType()
Register the content type for reference
LibertyContent::removeLastVersion()
Removes last version of the page (from pages) if theres some version in the liberty_content_history then the last version becomes the actual version
LibertyContent::removePermission()
Remove a permission to access the content
LibertyContent::rollbackVersion()
Roll back to a specific version of a page
LibertyContent::setHits()
Set Hits and Last Hit
LibertyContent::setPreference()
Set a hash value in the mPrefs hash. This does *NOT* store the value in the database. It does no checking for existing or duplicate values. the main point of this function is to limit direct accessing of the mPrefs hash. I will probably make mPrefs private one day.
LibertyContent::store()
Create a new content object or update an existing one
LibertyContent::storeAliases()
storeAliases will store aliases to a given content item
LibertyContent::storeHistory()
storeHistory will store the previous data into the history table for reference
LibertyContent::storePermission()
Store a permission for the object that has been loaded in the permission database
LibertyContent::storePreference()
Saves a preference to the liberty_content_prefs database table with the given pref name and value. If the value is NULL, the existing value will be delete and the value will not be saved. However, a zero will be stored. This will update the mPrefs hash.
LibertyContent::verify()
Verify the core class data required to update the liberty_content table entries
LibertyContent::verifyAccessControl()
Check permissions to establish if user has permission to access the object
LibertyContent::verifyAdminPermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
LibertyContent::verifyCreatePermission()
Determine if current user has the ability to create this type of content Note this will always return FALSEif the content isValid
LibertyContent::verifyEditPermission()
Deprecated, use verifyUpdatePermission
LibertyContent::verifyExpungePermission()
It will verify if a given user has a given $permission and if not, it will display the error template and die()
LibertyContent::verifyPostCommentsPermission()
It will verify if a given user has a given $permission and if not, it will display the error template and die()
LibertyContent::verifyUpdatePermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
LibertyContent::verifyUserPermission()
Function that determines if this content specified permission for the current gBitUser, and will throw a fatal error if not.
LibertyContent::verifyViewPermission()
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.

Class: LibertyBase

LibertyBase::__construct()
Constructor building on BitBase object
LibertyBase::getLibertyClass()
given a content_type_guid this will return an object of the proper type
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type
LibertyBase::getNewObject()
Simple method to create a given class with a specified content_id. The purpose of a method is to allow for derived classes to override as necessary.
LibertyBase::getNewObjectById()
Simple method to create a given class with a specified primary_id. The purpose of a method is to allow for derived classes to override as necessary.

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::__construct()
BitBase::clearFromCache()
BitBase::expunge()
Delete content object and all related records
BitBase::load()
BitBase::__destruct()

Class Details

[line 31]
Class that holds all information for a given user



Tags:

author:  spider <spider@steelsun.com>
version:  $Revision$


[ Top ]


Class Variables

$mPerms =

[line 33]


Type:   mixed


[ Top ]



Class Methods


static method getRoleNameFromId [line 631]

static array getRoleNameFromId( array $pRoleId, array $pColumns)

getRoleNameFromId



Tags:

return:  of group data
access:  public


Parameters:

array   $pRoleId  
array   $pColumns  

[ Top ]

constructor RolePermUser [line 43]

void RolePermUser( [numeric $pUserId = NULL], [numeric $pContentId = NULL])

RolePermUser Initialise class



Tags:

access:  public


Parameters:

numeric   $pUserId   User ID of the user we wish to load
numeric   $pContentId   Content ID of the user we wish to load

[ Top ]

method addUserToRole [line 509]

Either addUserToRole( numeric $pUserId, mixed $pRoleMixed)

addUserToRole Adds user pUserId to role(s) pRoleMixed.



Tags:

return:  an ADO RecordSet (success) or FALSE (failure).
access:  public


Parameters:

numeric   $pUserId   User ID
mixed   $pRoleMixed   A single role ID or an array of role IDs

[ Top ]

method assumeUser [line 64]

TRUE assumeUser( numeric $pUserId)

assumeUser Assume the identity of anothre user - Only admins may do this



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

numeric   $pUserId   User ID of the user you want to hijack

[ Top ]

method batchAssignUsersToRole [line 448]

void batchAssignUsersToRole( array $pRoleId)

batchAssignUsersToRole assign all users to a given role



Tags:

access:  public


Parameters:

array   $pRoleId  

[ Top ]

method batchSetUserDefaultRole [line 467]

TRUE batchSetUserDefaultRole( array $pRoleId)

batchSetUserDefaultRole



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pRoleId  

[ Top ]

method expunge [line 195]

always expunge( [ $pExpungeContent = NULL])

removes user and associated private data



Tags:

return:  FALSE??? TODO: fix return
access:  public


Overrides BitUser::expunge() (expunge removes user and associated private data)

Parameters:

   $pExpungeContent  

[ Top ]

method expungeRole [line 360]

TRUE expungeRole( numeric $pRoleId)

expungeRole remove a role



Tags:

return:  on success, FALSE on failure
access:  public


Parameters:

numeric   $pRoleId  

[ Top ]

method getAllRoles [line 275]

array getAllRoles( &$pListHash, array $pListHash)

getAllRoless Get a list of all Roles



Tags:

return:  of roles
access:  public


Parameters:

array   $pListHash   List Hash
   &$pListHash  

[ Top ]

method getAllUserRoles [line 341]

array getAllUserRoles( [numeric $pUserId = NULL])

getAllUserRoles



Tags:

return:  of roles a user belongs to
access:  public


Parameters:

numeric   $pUserId  

[ Top ]

method getDefaultRole [line 380]

Default getDefaultRole( [array $pRoleId = NULL])

getDefaultRole get the default role of a given user



Tags:

return:  Role ID if one is set
access:  public


Parameters:

array   $pRoleId   pass in a Role ID to make conditional function

[ Top ]

method getHomeRole [line 417]

TRUE getHomeRole( array $pRoleId)

getHomeRole get the URL where a user of that role should be sent



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pRoleId  

[ Top ]

method getRoleInfo [line 483]

role getRoleInfo( array $pRoleId)

getRoleInfo



Tags:

return:  information
access:  public


Parameters:

array   $pRoleId  

[ Top ]

method getRoleUsers [line 397]

list getRoleUsers( array $pRoleId)

getRoleUsers Get a list of users who share a given role id



Tags:

return:  of users who are in the role id
access:  public


Parameters:

array   $pRoleId  

[ Top ]

method isInRole [line 249]

TRUE isInRole( mixed $pRoleMixed)

isInRole work out if a given user is assigned to a role



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

mixed   $pRoleMixed   Role ID or Role Name (deprecated)

[ Top ]

method load [line 91]

TRUE load( [boolean $pFull = FALSE], [string $pUserName = NULL])

load



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Overrides BitUser::load() (load - loads all settings & preferences for this user)

Parameters:

boolean   $pFull   Load all permissions
string   $pUserName   User login name

[ Top ]

method loadRoles [line 236]

void loadRoles( [boolean $pForceRefresh = FALSE])

loadRoles load roles into $this->mRoles



Tags:

access:  public


Parameters:

boolean   $pForceRefresh  

[ Top ]

method removeUserFromRole [line 546]

void removeUserFromRole( array $pUserId, array $pRoleId)

removeUserFromRole



Tags:

access:  public


Parameters:

array   $pUserId  
array   $pRoleId  

[ Top ]

method roleExists [line 163]

TRUE roleExists( string $pRoleName, [numeric $pUserId = ROOT_USER_ID])

roleExists work out if a given role exists



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

string   $pRoleName  
numeric   $pUserId  

[ Top ]

method sanitizeUserInfo [line 108]

void sanitizeUserInfo( )

sanitizeUserInfo Used to remove sensitive information from $this->mInfo when it is unneccessary (i.e. $gQueryUser)



Tags:

access:  public


[ Top ]

method store [line 126]

TRUE store( &$pParamHash, array $pParamHash)

store



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Overrides BitUser::store() (store)

Parameters:

array   $pParamHash  
   &$pParamHash  

[ Top ]

method storeRole [line 595]

TRUE storeRole( &$pParamHash, array $pParamHash)

storeRole



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pParamHash  
   &$pParamHash  

[ Top ]

method storeUserDefaultRole [line 434]

TRUE storeUserDefaultRole( array $pUserId, array $pRoleId)

storeUserDefaultRole



Tags:

return:  on success, FALSE on failure
access:  public


Parameters:

array   $pUserId  
array   $pRoleId  

[ Top ]

method verifyRole [line 565]

TRUE verifyRole( &$pParamHash, array $pParamHash)

verifyRole



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pParamHash  
   &$pParamHash  

[ Top ]

method __wakeup [line 50]

void __wakeup( )



Tags:

access:  public


[ Top ]


Documentation generated on Wed, 29 Jul 2015 13:57:21 +0000 by phpDocumentor 1.5.0-lsces