[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/ -> lib-user.php (sommaire)

(pas de description)

Poids: 587 lignes (23 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 10 fonctions

  USER_deleteAccount()
  USER_createAndSendPassword()
  USER_sendActivationEmail()
  USER_createAccount()
  USER_sendNotification()
  USER_getPhoto()
  USER_deletePhoto()
  USER_addGroup()
  USER_delGroup()
  USER_emailMatches()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

USER_deleteAccount($uid)   X-Ref
Delete a user account

param: int       $uid   id of the user to delete
return: boolean   true = user deleted, false = an error occured

USER_createAndSendPassword($username, $useremail, $uid)   X-Ref
Create a new password and send it to the user

param: string  $username   user's login name
param: string  $useremail  user's email address
return: bool                true = success, false = an error occured

USER_sendActivationEmail($username, $useremail)   X-Ref
Inform a user their account has been activated.

param: string  $username   user's login name
param: string  $useremail  user's email address
return: bool                true = success, false = an error occured

USER_createAccount($username, $email, $passwd = '', $fullname = '', $homepage = '', $remoteusername = '', $service = '')   X-Ref
Create a new user

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

NOTE: Does NOT send out password emails.

param: string  $username   user name (mandatory)
param: string  $email      user's email address (mandatory)
param: string  $passwd     password (optional, see above)
param: string  $fullname   user's full name (optional)
param: string  $homepage   user's home page (optional)
return: int                 new user's ID

USER_sendNotification($username, $email, $uid, $mode='inactive')   X-Ref
Send an email notification when a new user registers with the site.

param: username string      User name of the new user
param: email    string      Email address of the new user
param: uid      int         User id of the new user
param: mode     string      Mode user was added at.

USER_getPhoto($uid = 0, $photo = '', $email = '', $width = 0)   X-Ref
Get a user's photo, either uploaded or from an external service

param: int     $uid    User ID
param: string  $photo  name of the user's uploaded image
param: string  $email  user's email address (for gravatar.com)
param: int     $width  preferred image width
return: string          <img> tag or empty string if no image available

USER_deletePhoto($photo, $abortonerror = true)   X-Ref
Delete a user's photo (i.e. the actual file)

param: string  $photo          name of the photo (without the path)
param: bool    $abortonerror   true: abort script on error, false: don't
return: void

USER_addGroup($groupid, $uid = '')   X-Ref
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

param: int      $groupid     Group we want to see if user belongs to and if not add to group
param: int         $uid        ID for user to check if in group and if not add user. If empty current user.
return: boolean     true if user is added to group, otherwise false

USER_delGroup($groupid, $uid = '')   X-Ref
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

param: int      $groupid      Group we want to see if user belongs to and if so delete user from group
param: int         $uid          ID for user to delete. If empty current user.
return: boolean     true if user is removed from group, otherwise false

USER_emailMatches($email, $domain_list)   X-Ref
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).

param: string  $email          email address to check
param: string  $domain_list    list of domain names
return: boolean                 true if match found, otherwise false



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics