Open Journal Systems  3.3.0
User Class Reference
Inheritance diagram for User:
Identity DataObject

Public Member Functions

 getAuthId ()
 
 getAuthStr ()
 
 getBillingAddress ()
 
 getContactSignature ()
 
 getDateLastEmail ()
 
 getDateLastLogin ()
 
 getDateRegistered ()
 
 getDateValidated ()
 
 getDisabled ()
 
 getDisabledReason ()
 
 getGossip ()
 
 getInlineHelp ()
 
 getInterestString ()
 
 getLocales ()
 
 getLocalizedSignature ()
 
 getMailingAddress ()
 
 getMustChangePassword ()
 
 getPassword ()
 
 getPhone ()
 
 getRoles ($contextId, $noCache=false)
 
 getSetting ($name, $contextId=null)
 
 getSettings ($contextId=null)
 
 getSignature ($locale)
 
 getUsername ()
 
 hasRole ($roles, $contextId)
 
 setAuthId ($authId)
 
 setAuthStr ($authStr)
 
 setBillingAddress ($billingAddress)
 
 setDateLastEmail ($dateLastEmail)
 
 setDateLastLogin ($dateLastLogin)
 
 setDateRegistered ($dateRegistered)
 
 setDateValidated ($dateValidated)
 
 setDisabled ($disabled)
 
 setDisabledReason ($reasonDisabled)
 
 setGossip ($gossip)
 
 setInlineHelp ($inlineHelp)
 
 setLocales ($locales)
 
 setMailingAddress ($mailingAddress)
 
 setMustChangePassword ($mustChangePassword)
 
 setPassword ($password)
 
 setPhone ($phone)
 
 setRoles ($roles, $contextId)
 
 setSignature ($signature, $locale)
 
 setUsername ($username)
 
 updateSetting ($name, $value, $type=null, $contextId=null)
 
- Public Member Functions inherited from Identity
 getAffiliation ($locale)
 
 getBiography ($locale)
 
 getCountry ()
 
 getCountryLocalized ()
 
 getEmail ()
 
 getFamilyName ($locale)
 
 getFullName ($preferred=true, $familyFirst=false, $defaultLocale=null)
 
 getGivenName ($locale)
 
 getLocalizedAffiliation ()
 
 getLocalizedBiography ()
 
getLocalizedData ($key, $preferredLocale=null)
 
 getLocalizedFamilyName ($defaultLocale=null)
 
 getLocalizedGivenName ($defaultLocale=null)
 
 getOrcid ()
 
 getPreferredPublicName ($locale)
 
 getUrl ()
 
 setAffiliation ($affiliation, $locale)
 
 setBiography ($biography, $locale)
 
 setCountry ($country)
 
 setEmail ($email)
 
 setFamilyName ($familyName, $locale)
 
 setGivenName ($givenName, $locale)
 
 setOrcid ($orcid)
 
 setPreferredPublicName ($preferredPublicName, $locale)
 
 setUrl ($url)
 
- Public Member Functions inherited from DataObject
 __construct ()
 
 addSupportedMetadataAdapter ($metadataAdapter)
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
 getDAO ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
 getSupportedExtractionAdapters ()
 
 getSupportedInjectionAdapters ()
 
 getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata ($metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
 unsetData ($key, $locale=null)
 
 upcastTo ($targetObject)
 

Protected Attributes

 $_roles = array()
 

Additional Inherited Members

- Data Fields inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Detailed Description

Basic class describing users existing in the system.

See also
UserDAO

Definition at line 23 of file User.inc.php.

Member Function Documentation

◆ getAuthId()

User::getAuthId ( )

Get ID of authentication source for this user.

Returns
int

Definition at line 314 of file User.inc.php.

References DataObject\getData().

◆ getAuthStr()

User::getAuthStr ( )

Get implicit auth ID string.

Returns
String

Definition at line 54 of file User.inc.php.

References DataObject\getData().

◆ getBillingAddress()

User::getBillingAddress ( )

Get billing address.

Returns
string

Definition at line 143 of file User.inc.php.

References DataObject\getData().

◆ getContactSignature()

User::getContactSignature ( )

◆ getDateLastEmail()

User::getDateLastEmail ( )

Get date user last sent an email.

Returns
datestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 202 of file User.inc.php.

References DataObject\getData().

◆ getDateLastLogin()

User::getDateLastLogin ( )

Get date user last logged in to the site.

Returns
datestamp

Definition at line 250 of file User.inc.php.

References DataObject\getData().

◆ getDateRegistered()

User::getDateRegistered ( )

Get date user registered with the site.

Returns
datestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 218 of file User.inc.php.

References DataObject\getData().

◆ getDateValidated()

User::getDateValidated ( )

Get date user email was validated with the site.

Returns
datestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 234 of file User.inc.php.

References DataObject\getData().

◆ getDisabled()

User::getDisabled ( )

Check if user is disabled.

Returns
boolean

Definition at line 282 of file User.inc.php.

References DataObject\getData().

◆ getDisabledReason()

User::getDisabledReason ( )

Get the reason the user was disabled.

Returns
string

Definition at line 298 of file User.inc.php.

References DataObject\getData().

◆ getGossip()

User::getGossip ( )

Get user gossip.

Returns
string

Definition at line 169 of file User.inc.php.

References DataObject\getData().

◆ getInlineHelp()

User::getInlineHelp ( )

Get the inline help display status for this user.

Returns
int

Definition at line 330 of file User.inc.php.

References DataObject\getData().

◆ getInterestString()

User::getInterestString ( )

Get the user's interests displayed as a comma-separated string

Returns
string

Definition at line 159 of file User.inc.php.

◆ getLocales()

User::getLocales ( )

Get user's working languages.

Returns
array

Definition at line 185 of file User.inc.php.

References DataObject\getData().

◆ getLocalizedSignature()

User::getLocalizedSignature ( )

Get localized user signature.

Definition at line 69 of file User.inc.php.

References Identity\getLocalizedData().

◆ getMailingAddress()

User::getMailingAddress ( )

Get mailing address.

Returns
string

Definition at line 127 of file User.inc.php.

References DataObject\getData().

◆ getMustChangePassword()

User::getMustChangePassword ( )

Check if user must change their password on their next login.

Returns
boolean

Definition at line 266 of file User.inc.php.

References DataObject\getData().

◆ getPassword()

User::getPassword ( )

Get password (encrypted).

Returns
string

Definition at line 95 of file User.inc.php.

References DataObject\getData().

◆ getPhone()

User::getPhone ( )

Get phone number.

Returns
string

Definition at line 111 of file User.inc.php.

References DataObject\getData().

Referenced by getContactSignature().

◆ getRoles()

User::getRoles (   $contextId,
  $noCache = false 
)

Get this user's roles in a context

Parameters
int$contextIdThe context to retrieve roles in.
bool$noCacheForce the roles to be retrieved from the database
Returns
array

Definition at line 386 of file User.inc.php.

References DAORegistry\getDAO(), and setRoles().

Referenced by hasRole().

◆ getSetting()

User::getSetting (   $name,
  $contextId = null 
)

Retrieve a user setting value.

Parameters
$name
$contextIdint
Returns
mixed

Definition at line 423 of file User.inc.php.

References DAORegistry\getDAO(), and DataObject\getId().

◆ getSettings()

User::getSettings (   $contextId = null)

Retrieve array of user settings.

Parameters
contextIdint
Returns
array

Definition at line 412 of file User.inc.php.

References DAORegistry\getDAO(), and DataObject\getId().

◆ getSignature()

User::getSignature (   $locale)

Get email signature.

Parameters
$localestring
Returns
string

Definition at line 78 of file User.inc.php.

References DataObject\getData().

◆ getUsername()

User::getUsername ( )

Get username.

Returns
string

Definition at line 38 of file User.inc.php.

References DataObject\getData().

◆ hasRole()

User::hasRole (   $roles,
  $contextId 
)

Check if this user has a role in a context

Parameters
int | array$rolesRole(s) to check for
int$contextIdThe context to check for roles in.
Returns
bool

Definition at line 358 of file User.inc.php.

References getRoles().

◆ setAuthId()

User::setAuthId (   $authId)

Set ID of authentication source for this user.

Parameters
$authIdint

Definition at line 322 of file User.inc.php.

References DataObject\setData().

◆ setAuthStr()

User::setAuthStr (   $authStr)

Set Shib ID string for this user.

Parameters
$authStrstring

Definition at line 62 of file User.inc.php.

References DataObject\setData().

◆ setBillingAddress()

User::setBillingAddress (   $billingAddress)

Set billing address.

Parameters
$billingAddressstring

Definition at line 151 of file User.inc.php.

References DataObject\setData().

◆ setDateLastEmail()

User::setDateLastEmail (   $dateLastEmail)

Set date user last sent an email.

Parameters
$dateLastEmaildatestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 210 of file User.inc.php.

References DataObject\setData().

◆ setDateLastLogin()

User::setDateLastLogin (   $dateLastLogin)

Set date user last logged in to the site.

Parameters
$dateLastLogindatestamp

Definition at line 258 of file User.inc.php.

References DataObject\setData().

◆ setDateRegistered()

User::setDateRegistered (   $dateRegistered)

Set date user registered with the site.

Parameters
$dateRegistereddatestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 226 of file User.inc.php.

References DataObject\setData().

◆ setDateValidated()

User::setDateValidated (   $dateValidated)

Set date user email was validated with the site.

Parameters
$dateValidateddatestamp (YYYY-MM-DD HH:MM:SS)

Definition at line 242 of file User.inc.php.

References DataObject\setData().

◆ setDisabled()

User::setDisabled (   $disabled)

Set whether or not user is disabled.

Parameters
$disabledboolean

Definition at line 290 of file User.inc.php.

References DataObject\setData().

◆ setDisabledReason()

User::setDisabledReason (   $reasonDisabled)

Set the reason the user is disabled.

Parameters
$reasonDisabledstring

Definition at line 306 of file User.inc.php.

References DataObject\setData().

◆ setGossip()

User::setGossip (   $gossip)

Set user gossip.

Parameters
$gossipstring

Definition at line 177 of file User.inc.php.

References DataObject\setData().

◆ setInlineHelp()

User::setInlineHelp (   $inlineHelp)

Set the inline help display status for this user.

Parameters
$inlineHelpint

Definition at line 338 of file User.inc.php.

References DataObject\setData().

◆ setLocales()

User::setLocales (   $locales)

Set user's working languages.

Parameters
$localesarray

Definition at line 194 of file User.inc.php.

References DataObject\setData().

◆ setMailingAddress()

User::setMailingAddress (   $mailingAddress)

Set mailing address.

Parameters
$mailingAddressstring

Definition at line 135 of file User.inc.php.

References DataObject\setData().

◆ setMustChangePassword()

User::setMustChangePassword (   $mustChangePassword)

Set whether or not user must change their password on their next login.

Parameters
$mustChangePasswordboolean

Definition at line 274 of file User.inc.php.

References DataObject\setData().

◆ setPassword()

User::setPassword (   $password)

Set password (assumed to be already encrypted).

Parameters
$passwordstring

Definition at line 103 of file User.inc.php.

References DataObject\setData().

◆ setPhone()

User::setPhone (   $phone)

Set phone number.

Parameters
$phonestring

Definition at line 119 of file User.inc.php.

References DataObject\setData().

◆ setRoles()

User::setRoles (   $roles,
  $contextId 
)

Set this user's roles in a context

Parameters
array$rolesThe roles to assign this user
int$contextIdThe context to assign these roles

Definition at line 403 of file User.inc.php.

Referenced by getRoles().

◆ setSignature()

User::setSignature (   $signature,
  $locale 
)

Set signature.

Parameters
$signaturestring
$localestring

Definition at line 87 of file User.inc.php.

References DataObject\setData().

◆ setUsername()

User::setUsername (   $username)

Set username.

Parameters
$usernamestring

Definition at line 46 of file User.inc.php.

References DataObject\setData().

◆ updateSetting()

User::updateSetting (   $name,
  $value,
  $type = null,
  $contextId = null 
)

Set a user setting value.

Parameters
$namestring
$valuemixed
$typestring optional
$contextIdint optional

Definition at line 435 of file User.inc.php.

References DAORegistry\getDAO(), and DataObject\getId().

Field Documentation

◆ $_roles

array User::$_roles = array()
protected

Roles assigned to this user grouped by context

Definition at line 28 of file User.inc.php.


The documentation for this class was generated from the following file: