class uKnowvaUser extends CUser


Located at : UKNOWVA_ROOT/libraries/conv/uknowvauser.php

The uKnowvaUser class has all the functions related to the current user This is a sub class of Cuser & Juser with all the required added functions

Properties

integer $id Unique id from JUser
string $name The users real name (or nickname) from JUser
string $username The login name from JUser
string $email The email from JUser
string $password MD5 encrypted password from JUser
string $password_clear Clear password, only available when a new password is set for a user from JUser
string $usertype User type Used in Joomla 1.0 and 1.5 for access control. from JUser
integer $block Block status from JUser
integer $sendEmail Should this user receive system email from JUser
datetime $registerDate Date the user was registered from JUser
datetime $lastvisitDate Date of last visit from JUser
string $activation Activation hash from JUser
string $params User parameters from JUser
array $groups Associative array of user names => group ids from JUser
boolean $guest Guest status from JUser
$designation from JUser
$reports_to from JUser
$_userid from CUser
$_status from CUser
$_cparams from CUser
$_tooltip from CUser
$_points from CUser
$_init from CUser
$_thumb from CUser
$_avatar from CUser
$_isonline from CUser
$_view from CUser
$_posted_on from CUser
$_invite from CUser
$_friendcount from CUser
$_alias from CUser
$_profile_id from CUser
$_storage from CUser
$_watermark_hash from CUser
$_search_email from CUser
$_friends from CUser
$_groups from CUser
$_events from CUser
$_cacheAction from CUser
$latitude from CUser
$longitude from CUser

Methods

__construct(integer $identifier)

Constructor activating the default information of the language

from JUser
string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value)

Method to set the property when the properties are already assigned

from CUser
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static JUser
getInstance($identifier, $username_as_identifier = false)

Returns the global User object, only creating it if it doesn't already exist.

from JUser
mixed
getParam(string $key, mixed $default = null)

Method to get a parameter value

from JUser
mixed
setParam(string $key, mixed $value)

Method to set a parameter

from JUser
mixed
defParam(string $key, mixed $value)

Method to set a default parameter if it does not exist

from JUser
boolean
authorize(string $action, string $assetname = null) deprecated

Proxy to authorise

from JUser
boolean
authorise(string $action, string $assetname = null, $assetObject = null)

Method to check CUser object authorisation against an access control

from CUser
array
authorisedLevels() deprecated

Proxy to getAuthorisedViewLevels

from JUser
array
getAuthorisedCategories(string $component, string $action)

Method to return a list of all categories that a user has permission for a given action

from JUser
array
getAuthorisedViewLevels()

Gets an array of the authorised access levels for the user

from JUser
array
getAuthorisedGroups()

Gets an array of the authorised user groups

from JUser
boolean
setLastVisit(integer $timestamp = null)

Pass through method to the table for setting the last visit date

from JUser
object
getParameters(boolean $loadsetupfile = false, path $path = null)

Method to get the user parameters

from JUser
void
setParameters(object $params)

Method to get the user parameters

from JUser
static object
getTable(string $type = null, string $prefix = 'JTable')

Method to get the user table object

from JUser
boolean
bind(array $array)

Method to bind an associative array of data to a user object

from JUser
boolean
save($group = '')

Store the user data.

from CUser
boolean
delete()

Method to delete the JUser object from the database

from CUser
boolean
load(mixed $id)

Method to load a JUser object by user id number

from JUser
getParameter($param_name)

No description

from JUser
setParameter($param_name, $value)

No description

from JUser
isAdmin()

No description

from JUser
isSuperAdmin()

No description

from JUser
getSuperiors($includeadmins = false, $groups = array())

No description

from JUser
getImmediateSuperiors($groups = array())

No description

from JUser
getSubordinates($groups = array(), $keyword = null)

No description

from JUser
getImmediateSubordinates($groups = array())

No description

from JUser
isSuperiorOf($userid, $checkadmins = false)

No description

from JUser
isImmediateSuperiorOf($userid)

No description

from JUser
isSubordinateOf($userid, $checkadmins = false)

No description

from JUser
isManager()

No description

from JUser
sendNotification($content, $type = null, $link = null, $icon = null, $readonlyonce = true)

No description

from JUser
getGlobalNotifications($return_count = false)

No description

from JUser
markNotificationRead($type, $strict = false)

No description

from JUser
sendSystemMail($subject, $body, $templateFile = '', $params = '', $status, $email_type = '')

No description

from JUser
sendMail($subject, $body, $mode, $cc = null, $bcc = null, $attachment = null, $replyto = null, $replytoname = null)

No description

from JUser
getSnapShot($include_thumbnail = true, $linkprofile = true, $open_link_in_new_window = true)

No description

from JUser
getProfileAnchor($relative = true, $attributes = array(), $anchor_text = 'name')

No description

from JUser
belongsToGroup($groupid)

No description

from JUser
getTimeZone()

No description

from JUser
getTimeZoneOffset($hours = true)

No description

from JUser
verifyPassword($password)

No description

from JUser
isSubscribedToTag($tag)

Since 2.5.1 Given a tag, checks if the user is subscribed to this tag, if not subscribed, then returns false, else returns true

from JUser
assignCommunityGroups($community_groups = array())

No description

from JUser
CUser($id)

Constructor.

from CUser
getAlias()

No description

from CUser
getAppParams($appName)

No description

from CUser
init($initObj = null)

Inititalize the user JUser object return true if the user is a new

from CUser
isInGroup(type $id)

Return true if the user is a member of the group

from CUser
isInEvent(type $id)

Return true if user has responsed to the event

from CUser
isFriendWith( $id)

True if this person is a friend with the given userid

from CUser
updateFriendList($forceUpdate = false)

Update internal list of friends Run only when user is logged in

from CUser
updateGroupList($forceUpdate = false)

Update internal list of groups this user is a member of Run only when user is logged in

from CUser
updateEventList(type $forceUpdate = false)

Update internal list of events that this user has responded to

from CUser
string
getStatus($rawFormat = false)

Return current user status

from CUser
getViewCount()

No description

from CUser
String
getStorage()

Returns the storage method for the particular user.

from CUser
getTooltip()

Return the html formatted tooltip

from CUser
getKarmaPoint()

No description

from CUser
getActivityCount()

No description

from CUser
getDisplayName($rawFormat = false)

Return the the name for display, either username of name based on backend config

from CUser
int
getTimezone()

Retrieve the current timezone the user is at.

from CUser
getUtcOffset()

Return current user UTC offset

from CUser
getFriendCount()

Return the count of the friends

from CUser
getFriendIds()

Return array of ids of friends

from CUser
getAvatar()

Return path to avatar image

from CUser
getThumbAvatar()

Return path to thumb image

from CUser
getCompleteProfile()

No description

from CUser
getInfo(string $fieldCode)

Return the custom profile data based on the given field code

from CUser
boolean
setInfo($fieldCode, $value, $access)

Counterpart of CUser::getInfo. Sets a specific field's value given the field code.

from CUser
the
getProfileLink(boolean $absolute = false)

returns the profile href of the user

from CUser
getAddress()

Return the given user's address string We will build the address using known FIELD CODE FIELDSTREET, FIELDCITY, FIELDSTATE, FIELDZIPCODE, FIELD_COUNTRY, If it is not defined, we just skip it

from CUser
getParams()

Return the combined params of JUser and CUser

from CUser
isOnline()

No description

from CUser
isBlocked()

Check if the user is blocked

from CUser
Boolean
canCreateGroups()

Determines whether the current user is allowed to create groups

from CUser
count(string $name)

Return stored number set by setCount, kept within params

from CUser
setCount(type $name, type $value)

Generic method to store a number in params

from CUser
Boolean
canCreateEvents()

Determines whether the current user is allowed to create events

from CUser
viewHit()

Increment view count.

from CUser
int
getProfileType()

Return the profile type the user is currently on

from CUser
setStatus($status = '')

Sets the status for the current user

from CUser
resolveLocation($address)

Interface fucntions *

from CUser
string
authoriseErrorMsg()

Method to return authentication error msg

from CUser
isPhotoUploadAllowed($groupid)

No description

from CUser
isVideoUploadAllowed($groupid)

No description

from CUser
isGroupCreationAllowed()

No description

from CUser
isEventCreationAllowed($groupid)

No description

from CUser
isUploadAccessAllowed($type, $groupid)

No description

from CUser
addActivity($title, $content = '', $cmd = null, $target, $app = 'wall', $like = true, $comments = true)

No description

from CUser
getOwnedGroups()

No description

from CUser

Details

in JUser at line 211
JObject __construct(integer $identifier)

Constructor activating the default information of the language

Parameters

integer $identifier The primary key of the user to load (optional).

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in CUser at line 66
mixed set(string $property, mixed $value)

Method to set the property when the properties are already assigned

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JUser at line 238
static JUser getInstance($identifier, $username_as_identifier = false)

Returns the global User object, only creating it if it doesn't already exist.

Parameters

$identifier
$username_as_identifier

Return Value

JUser The User object.

in JUser at line 277
mixed getParam(string $key, mixed $default = null)

Method to get a parameter value

Parameters

string $key Parameter key
mixed $default Parameter default value

Return Value

mixed The value or the default if it did not exist

in JUser at line 292
mixed setParam(string $key, mixed $value)

Method to set a parameter

Parameters

string $key Parameter key
mixed $value Parameter value

Return Value

mixed Set parameter value

in JUser at line 307
mixed defParam(string $key, mixed $value)

Method to set a default parameter if it does not exist

Parameters

string $key Parameter key
mixed $value Parameter value

Return Value

mixed Set parameter value

in JUser at line 324
boolean authorize(string $action, string $assetname = null) deprecated

deprecated 12.1

Proxy to authorise

Parameters

string $action The name of the action to check for permission.
string $assetname The name of the asset on which to perform the action.

Return Value

boolean True if authorised

in CUser at line 1093
boolean authorise(string $action, string $assetname = null, $assetObject = null)

Method to check CUser object authorisation against an access control

Parameters

string $action The name of the action to check for permission.
string $assetname The name of the asset on which to perform the action.
$assetObject

Return Value

boolean True if authorised

in JUser at line 384
array authorisedLevels() deprecated

deprecated 12.1

Proxy to getAuthorisedViewLevels

Return Value

array List of categories that this group can do this action to (empty array if none). Categories must be published.

in JUser at line 399
array getAuthorisedCategories(string $component, string $action)

Method to return a list of all categories that a user has permission for a given action

Parameters

string $component The component from which to retrieve the categories
string $action The name of the section within the component from which to retrieve the actions.

Return Value

array List of categories that this group can do this action to (empty array if none). Categories must be published.

in JUser at line 427
array getAuthorisedViewLevels()

Gets an array of the authorised access levels for the user

Return Value

array

in JUser at line 445
array getAuthorisedGroups()

Gets an array of the authorised user groups

Return Value

array

in JUser at line 466
boolean setLastVisit(integer $timestamp = null)

Pass through method to the table for setting the last visit date

Parameters

integer $timestamp The timestamp, defaults to 'now'.

Return Value

boolean True on success.

in JUser at line 489
object getParameters(boolean $loadsetupfile = false, path $path = null)

Method to get the user parameters

This function tries to load an XML file based on the user's usertype. The filename of the xml file is the same as the usertype. The functionals has a static variable to store the parameters setup file base path. You can call this function statically to set the base path if needed.

Parameters

boolean $loadsetupfile If true, loads the parameters setup file. Default is false.
path $path Set the parameters setup file base path to be used to load the user parameters.

Return Value

object The user parameters object.

in JUser at line 526
void setParameters(object $params)

Method to get the user parameters

Parameters

object $params The user parameters object

Return Value

void

in JUser at line 545
static object getTable(string $type = null, string $prefix = 'JTable')

Method to get the user table object

This function uses a static variable to store the table name of the user table to instantiate. You can call this function statically to set the table name if needed.

Parameters

string $type The user table name to be used
string $prefix The user table prefix to be used

Return Value

object The user table object

in JUser at line 574
boolean bind(array $array)

Method to bind an associative array of data to a user object

Parameters

array $array The associative array to bind to the object

Return Value

boolean True on success

in CUser at line 998
boolean save($group = '')

Store the user data.

Parameters

$group

Return Value

boolean True on success

in CUser at line 89
boolean delete()

Method to delete the JUser object from the database

Return Value

boolean True on success

in JUser at line 827
boolean load(mixed $id)

Method to load a JUser object by user id number

Parameters

mixed $id The user id of the user to load

Return Value

boolean True on success

in JUser at line 866
getParameter($param_name)

Parameters

$param_name

in JUser at line 875
setParameter($param_name, $value)

Parameters

$param_name
$value

in JUser at line 884
isAdmin()

in JUser at line 890
isSuperAdmin()

in JUser at line 897
getSuperiors($includeadmins = false, $groups = array())

Parameters

$includeadmins
$groups

in JUser at line 904
getImmediateSuperiors($groups = array())

Parameters

$groups

in JUser at line 912
getSubordinates($groups = array(), $keyword = null)

Parameters

$groups
$keyword

in JUser at line 919
getImmediateSubordinates($groups = array())

Parameters

$groups

in JUser at line 926
isSuperiorOf($userid, $checkadmins = false)

Parameters

$userid
$checkadmins

in JUser at line 933
isImmediateSuperiorOf($userid)

Parameters

$userid

in JUser at line 940
isSubordinateOf($userid, $checkadmins = false)

Parameters

$userid
$checkadmins

in JUser at line 946
isManager()

in JUser at line 952
sendNotification($content, $type = null, $link = null, $icon = null, $readonlyonce = true)

Parameters

$content
$type
$link
$icon
$readonlyonce

in JUser at line 958
getGlobalNotifications($return_count = false)

Parameters

$return_count

in JUser at line 966
markNotificationRead($type, $strict = false)

Parameters

$type
$strict

in JUser at line 974
sendSystemMail($subject, $body, $templateFile = '', $params = '', $status, $email_type = '')

Parameters

$subject
$body
$templateFile
$params
$status
$email_type

in JUser at line 994
sendMail($subject, $body, $mode, $cc = null, $bcc = null, $attachment = null, $replyto = null, $replytoname = null)

Parameters

$subject
$body
$mode
$cc
$bcc
$attachment
$replyto
$replytoname

in JUser at line 1003
getSnapShot($include_thumbnail = true, $linkprofile = true, $open_link_in_new_window = true)

Parameters

$include_thumbnail
$linkprofile
$open_link_in_new_window

in JUser at line 1015
getProfileAnchor($relative = true, $attributes = array(), $anchor_text = 'name')

Parameters

$relative
$attributes
$anchor_text

in JUser at line 1052
belongsToGroup($groupid)

Parameters

$groupid

in JUser at line 1059
getTimeZone()

in JUser at line 1067
getTimeZoneOffset($hours = true)

Parameters

$hours

in JUser at line 1079
verifyPassword($password)

Parameters

$password

in JUser at line 1094
isSubscribedToTag($tag)

Since 2.5.1 Given a tag, checks if the user is subscribed to this tag, if not subscribed, then returns false, else returns true

Parameters

$tag

in JUser at line 1104
assignCommunityGroups($community_groups = array())

Parameters

$community_groups

in CUser at line 47
CUser($id)

Constructor.

Perform a shallow copy of JUser object

Parameters

$id

in CUser at line 72
getAlias()

in CUser at line 101
getAppParams($appName)

Parameters

$appName

in CUser at line 114
init($initObj = null)

Inititalize the user JUser object return true if the user is a new

Parameters

$initObj

in CUser at line 294
isInGroup(type $id)

Return true if the user is a member of the group

Parameters

type $id

in CUser at line 308
isInEvent(type $id)

Return true if user has responsed to the event

Parameters

type $id

in CUser at line 321
isFriendWith( $id)

True if this person is a friend with the given userid

Parameters

$id

in CUser at line 349
updateFriendList($forceUpdate = false)

Update internal list of friends Run only when user is logged in

Parameters

$forceUpdate

in CUser at line 370
updateGroupList($forceUpdate = false)

Update internal list of groups this user is a member of Run only when user is logged in

Parameters

$forceUpdate

in CUser at line 391
updateEventList(type $forceUpdate = false)

Update internal list of events that this user has responded to

Parameters

type $forceUpdate

in CUser at line 411
string getStatus($rawFormat = false)

Return current user status

Parameters

$rawFormat

Return Value

string user status

in CUser at line 453
getViewCount()

in CUser at line 465
String getStorage()

Returns the storage method for the particular user.

It allows the remote storage to be able to identify which storage the user is currently on.

Return Value

String The storage method. 'file' or 'remote'

in CUser at line 472
getTooltip()

Return the html formatted tooltip

in CUser at line 486
getKarmaPoint()

in CUser at line 494
getActivityCount()

in CUser at line 502
getDisplayName($rawFormat = false)

Return the the name for display, either username of name based on backend config

Parameters

$rawFormat

in CUser at line 523
int getTimezone()

Retrieve the current timezone the user is at.

Return Value

int The current offset the user is located.

in CUser at line 541
getUtcOffset()

Return current user UTC offset

in CUser at line 569
getFriendCount()

Return the count of the friends

in CUser at line 599
getFriendIds()

Return array of ids of friends

in CUser at line 610
getAvatar()

Return path to avatar image

in CUser at line 651
getThumbAvatar()

Return path to thumb image

in CUser at line 693
getCompleteProfile()

in CUser at line 711
getInfo(string $fieldCode)

Return the custom profile data based on the given field code

Parameters

string $fieldCode The field code that is given for the specific field.

in CUser at line 771
boolean setInfo($fieldCode, $value, $access)

Counterpart of CUser::getInfo. Sets a specific field's value given the field code.

Parameters

$fieldCode
$value
$access

Return Value

boolean True on success false otherwise

returns the profile href of the user

Parameters

boolean $absolute if true, an absolute link shall be returned

Return Value

the profile href of the user

in CUser at line 798
getAddress()

Return the given user's address string We will build the address using known FIELD CODE FIELDSTREET, FIELDCITY, FIELDSTATE, FIELDZIPCODE, FIELD_COUNTRY, If it is not defined, we just skip it

in CUser at line 888
JParameter getParams()

Return the combined params of JUser and CUser

Return Value

JParameter

in CUser at line 893
isOnline()

in CUser at line 903
isBlocked()

Check if the user is blocked

in CUser at line 914
Boolean canCreateGroups()

Determines whether the current user is allowed to create groups

Return Value

Boolean True if user is allowed and false otherwise.

in CUser at line 933
count(string $name)

Return stored number set by setCount, kept within params

Parameters

string $name

in CUser at line 943
setCount(type $name, type $value)

Generic method to store a number in params

Parameters

type $name
type $value

in CUser at line 955
Boolean canCreateEvents()

Determines whether the current user is allowed to create events

Return Value

Boolean True if user is allowed and false otherwise.

in CUser at line 976
viewHit()

Increment view count.

Only increment the view count if the view is from a different session

in CUser at line 1031
int getProfileType()

Return the profile type the user is currently on

Return Value

int The current profile type the user is in.

in CUser at line 1057
setStatus($status = '')

Sets the status for the current user

Parameters

$status

in CUser at line 1070
resolveLocation($address)

Interface fucntions *

Parameters

$address

in CUser at line 1118
string authoriseErrorMsg()

Method to return authentication error msg

Return Value

string error message

in CUser at line 1123
isPhotoUploadAllowed($groupid)

Parameters

$groupid

in CUser at line 1126
isVideoUploadAllowed($groupid)

Parameters

$groupid

in CUser at line 1129
isGroupCreationAllowed()

in CUser at line 1132
isEventCreationAllowed($groupid)

Parameters

$groupid

in CUser at line 1138
isUploadAccessAllowed($type, $groupid)

Parameters

$type
$groupid

in CUser at line 1170
addActivity($title, $content = '', $cmd = null, $target, $app = 'wall', $like = true, $comments = true)

Parameters

$title
$content
$cmd
$target
$app
$like
$comments

in CUser at line 1198
getOwnedGroups()