Methods summary
public
|
#
__construct( array $id = null, integer $id,… )
constructor
Parameters
- $id
- Array of key-value-pairs to be assigned to the user. (for backward compatibility only)
- $id,…
- ID of the user to be loaded from the database.
Overrides
|
public
boolean
|
#
isGuest( )
check if the user is a guest user
check if the user is a guest user
Returns
boolean returns false
|
public static
string
|
#
getUnameFromId( integer $userid, integer $usereal = 0 )
Updated by Catzwolf 11 Jan 2004
find the username for a given ID
Updated by Catzwolf 11 Jan 2004
find the username for a given ID
Parameters
- $userid
- ID of the user to find
- $usereal
- switch for usename or realname
Returns
string name of the user. name for "anonymous" if not found.
|
public
|
#
setGroups( array $groupsArr )
set the groups for the user
set the groups for the user
Parameters
- $groupsArr
- Array of groups that user belongs to
|
public
|
#
sendWelcomeMessage( )
sends a welcome message to the user which account has just been activated
sends a welcome message to the user which account has just been activated
return TRUE if success, FALSE if not
|
public
|
#
newUserNotifyAdmin( )
sends a notification to admins to inform them that a new user registered
sends a notification to admins to inform them that a new user registered
This method first checks in the preferences if we need to send a notification to admins upon new user
registration. If so, it sends the mail.
return TRUE if success, FALSE if not
|
public
array
&
|
#
getGroups( )
get the groups that the user belongs to
get the groups that the user belongs to
Returns
array array of groups
|
public
boolean
|
#
isAdmin( integer $module_id = null )
Is the user admin ?
This method will return true if this user has admin rights for the specified module.
- If you don't specify any module ID, the current module will be checked.
- If you set the module_id to -1, it will return true if the user has admin rights for at least one module
Parameters
- $module_id
- check if user is admin of this module
Returns
boolean is the user admin of that module?
|
public
array
|
#
rank( )
get the user's rank
Returns
array array of rank ID and title
|
public
boolean
|
#
isActive( )
is the user activated?
Returns
boolean
|
public
boolean
|
#
isOnline( )
is the user currently logged in?
is the user currently logged in?
Returns
boolean
|
public
string
|
#
gravatar( string $rating = false, integer $size = false, string $default = false, string $border = false, $overwrite = false )
Gravatar plugin for ImpressCMS
Gravatar plugin for ImpressCMS
Parameters
- $rating
- $size
- (size in pixels of the image. Accept values between 1 to 80. Default 80)
- $default
- (url of default avatar. Will be used if no gravatar are found)
- $border
- (hexadecimal color)
- $overwrite
Returns
string (gravatar or ImpressCMS avatar)
Author
TheRplima
|