Class UserOperations

Description

Class for doing user related functions. Maybe of the User object functions are just wrappers around these.

  • since: 0.6.1
  • license: GPL

Located in /class.useroperations.inc.php (line 42)


	
			
Method Summary
static void &get_instance ()
UserOperations __construct ()
mixed CountPageOwnershipByID (mixed $id)
mixed DeleteUserByID (mixed $id)
void GenerateDropdown ([ $currentuserid = ''], [ $name = 'ownerid'])
mixed InsertUser ( $user, mixed $usre)
mixed &LoadUserByID (mixed $id)
mixed &LoadUserByUsername (mixed $username, [mixed $password = ''], [mixed $activeonly = true], [mixed $adminaccessonly = false])
array &LoadUsers ()
array &LoadUsersInGroup (mixed $groupid)
mixed UpdateUser (mixed $user)
true UserInGroup (int $uid, int $gid)
Methods
static method get_instance (line 49)
  • access: public
static void &get_instance ()
Constructor __construct (line 44)
  • access: protected
UserOperations __construct ()
CountPageOwnershipByID (line 332)

Show the number of pages the given user's id owns.

  • return: Number of pages they own. 0 if any problems.
  • since: 0.6.1
mixed CountPageOwnershipByID (mixed $id)
  • mixed $id: Id of the user to count
DeleteUserByID (line 294)

Deletes an existing user from the database.

  • return: If successful, true. If it fails, false.
  • since: 0.6.1
mixed DeleteUserByID (mixed $id)
  • mixed $id: Id of the user to delete
GenerateDropdown (line 354)
void GenerateDropdown ([ $currentuserid = ''], [ $name = 'ownerid'])
  • $currentuserid
  • $name
InsertUser (line 229)

Saves a new user to the database.

  • return: The new user id. If it fails, it returns -1.
  • since: 0.6.1
mixed InsertUser ( $user, mixed $usre)
  • mixed $usre: User object to save
  • $user
LoadUserByID (line 194)

Loads a user by user id.

  • return: If successful, the filled User object. If it fails, it returns false.
  • since: 0.6.1
mixed &LoadUserByID (mixed $id)
  • mixed $id: User id to load
LoadUserByUsername (line 136)

Loads a user by username.

  • return: If successful, the filled User object. If it fails, it returns false.
  • since: 0.6.1
mixed &LoadUserByUsername (mixed $username, [mixed $password = ''], [mixed $activeonly = true], [mixed $adminaccessonly = false])
  • mixed $username: Username to load
  • mixed $password: Password to check against
  • mixed $activeonly: Only load the user if they are active
  • mixed $adminaccessonly: Only load the user if they have admin access
LoadUsers (line 65)

Gets a list of all users

  • return: An array of User objects
  • since: 0.6.1
array &LoadUsers ()
LoadUsersInGroup (line 99)

Gets a list of all users in a given group

  • return: An array of User objects
array &LoadUsersInGroup (mixed $groupid)
  • mixed $groupid: Group for the loaded users
UpdateUser (line 262)

Updates an existing user in the database.

  • return: If successful, true. If it fails, false.
  • since: 0.6.1
mixed UpdateUser (mixed $user)
  • mixed $user: User object to save
UserInGroup (line 386)

Tests $uid is a member of the group identified by $gid

  • return: if test passes, false otherwise
true UserInGroup (int $uid, int $gid)
  • int $uid: User ID to test
  • int $gid: Group ID to test

Documentation generated on Sun, 12 Aug 2012 08:38:31 -0600 by phpDocumentor 1.3.2