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

Procedural File: lib-user.php

Source Location: /system/lib-user.php



Page Details:









plugin_autotags_user [line 1117]

void plugin_autotags_user( string $op, [string $content = ''], [array $autotag = ''], mixed 3)

Implements the [user:] autotag.



Parameters

string   $op   operation to perform
string   $content   item (e.g. story text), including the autotag
array   $autotag   parameters used in the autotag
mixed   3   tag names (for $op='tagname') or formatted content
[ Top ]



USER_addGroup [line 517]

boolean USER_addGroup( int $groupid, [int $uid = ''])

Add user to group if user does not belong to specified group

This is part of the Geeklog user implementation. This function looks up whether a user belongs to a specified group and if not adds them to the group




Tags:

return:  true if user is added to group, otherwise false


Parameters

int   $groupid   Group we want to see if user belongs to and if not add to group
int   $uid   ID for user to check if in group and if not add user. If empty current user.
[ Top ]



USER_createAccount [line 238]

int USER_createAccount( string $username, string $email, [string $passwd = ''], [string $fullname = ''], [string $homepage = ''], [ $remoteusername = ''], [ $service = ''], [boolean $batchImport = false])

Create a new user

Also calls the custom user registration (if enabled) and plugin functions.

NOTE: Does NOT send out password emails.




Tags:

return:  new user's ID


Parameters

string   $username   username (mandatory)
string   $email   user's email address (mandatory)
string   $passwd   password (optional, see above)
string   $fullname   user's full name (optional)
string   $homepage   user's home page (optional)
boolean   $batchImport   set to true when called from importuser() in admin/users.php (optional)
   $remoteusername  
   $service  
[ Top ]



USER_createAndSendPassword [line 140]

boolean USER_createAndSendPassword( string $username, string $useremail, $uid)

Create a new password and send it to the user



Tags:

return:  true = success, false = an error occured


Parameters

string   $username   user's login name
string   $useremail   user's email address
   $uid  
[ Top ]



USER_deleteAccount [line 46]

boolean USER_deleteAccount( int $uid)

Delete a user account



Tags:

return:  true = user deleted, false = an error occured


Parameters

int   $uid   id of the user to delete
[ Top ]



USER_deletePhoto [line 483]

void USER_deletePhoto( string $photo, [boolean $abortonerror = true])

Delete a user's photo (i.e. the actual file)

NOTE: Will silently ignore non-existing files.




Parameters

string   $photo   name of the photo (without the path)
boolean   $abortonerror   true: abort script on error, false: don't
[ Top ]



USER_delGroup [line 552]

boolean USER_delGroup( int $groupid, [int $uid = ''])

Delete from group if user belongs to specified group

This is part of the Geeklog user implementation. This function looks up whether a user belongs to a specified group and if so removes them from the group




Tags:

return:  true if user is removed from group, otherwise false


Parameters

int   $groupid   Group we want to see if user belongs to and if so delete user from group
int   $uid   ID for user to delete. If empty current user.
[ Top ]



USER_emailMatches [line 586]

boolean USER_emailMatches( string $email, string $domain_list)

Check email address against a list of domains

Checks if the given email's domain part matches one of the entries in a comma-separated list of domain names (regular expressions are allowed).




Tags:

return:  true if match found, otherwise false


Parameters

string   $email   email address to check
string   $domain_list   list of domain names
[ Top ]



USER_getAllowedTopics [line 817]

array USER_getAllowedTopics( )

Get topics the current user has access to



Tags:

return:  Array of topic IDs


[ Top ]



USER_getChildGroups [line 655]

array USER_getChildGroups( int $groupid)

Used to return an array of groups that a base group contains GL supports hierarchical groups and this will return all the child groups



Tags:

return:  Array of child groups


Parameters

int   $groupid   Group id to get list of groups for
[ Top ]



USER_getPhoto [line 391]

string USER_getPhoto( [int $uid = 0], [string $photo = ''], [string $email = ''], [int $width = 0])

Get a user's photo, either uploaded or from an external service

NOTE: All parameters are optional and can be passed as 0 / empty string.




Tags:

return:  <img> tag or empty string if no image available


Parameters

int   $uid   User ID
string   $photo   name of the user's uploaded image
string   $email   user's email address (for gravatar.com)
int   $width   preferred image width
[ Top ]



USER_isSubscribedToTopic [line 782]

boolean USER_isSubscribedToTopic( string $tid)

Check if user is subscribed to a topic



Tags:

return:  true: subscribed, false: not subscribed


Parameters

string   $tid   Topic ID
[ Top ]



USER_sendActivationEmail [line 190]

boolean USER_sendActivationEmail( string $username, string $useremail)

Inform a user their account has been activated.



Tags:

return:  true = success, false = an error occured


Parameters

string   $username   user's login name
string   $useremail   user's email address
[ Top ]



USER_sendNotification [line 355]

boolean USER_sendNotification( username $username, email $email, uid $uid, [mode $mode = 'inactive'])

Send an email notification when a new user registers with the site.



Tags:

return:  true = success, false = an error occured


Parameters

username   $username   string Username of the new user
email   $email   string Email address of the new user
uid   $uid   int User id of the new user
mode   $mode   string Mode user was added at.
[ Top ]



USER_showProfile [line 847]

string USER_showProfile( int $uid, [boolean $preview = false], [int $msg = 0], [string $plugin = ''])

Shows a profile for a user

This grabs the user profile for a given user and displays it




Tags:

return:  HTML for user profile page


Parameters

int   $uid   User ID of profile to get
boolean   $preview   whether being called as preview from My Account
int   $msg   Message to display (if != 0)
string   $plugin   optional plugin name for message
[ Top ]



USER_subscribeToTopic [line 688]

void USER_subscribeToTopic( string $tid)

Subscribe user to a topic (for the Daily Digest)



Parameters

string   $tid   Topic ID
[ Top ]



USER_uniqueUsername [line 621]

string USER_uniqueUsername( string $username)

Ensure unique username

Checks that $username does not exist yet and creates a new unique username (based off of $username) if necessary. Mostly useful for creating accounts for remote users.




Tags:

return:  unique username
todo:  Bugs: Race conditions apply ...


Parameters

string   $username   initial username
[ Top ]



USER_unsubscribeFromTopic [line 731]

void USER_unsubscribeFromTopic( string $tid)

Unsubscribe user from a topic (for the Daily Digest)



Parameters

string   $tid   Topic ID
[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:51:47 +0000 by phpDocumentor 1.4.3