Class rcube_user

Description

Class representing a system user

Located in /rcube_user.php (line 33)


	
			
Class Constant Summary
Variable Summary
 mixed $data
 mixed $ID
 mixed $language
Method Summary
 static rcube_user create (string $user, string $host)
 static string email2user (string $email)
 static rcube_user query (string $user, string $host)
 static mixed user2email (string $user, [boolean $first = true], [boolean $extended = false])
 rcube_user __construct ([int $id = null], [array $sql_arr = null])
 boolean delete_identity (int $iid)
 boolean delete_search (int $sid)
 array get_identity ([int $id = null])
 array get_prefs ()
 array get_search (int $id)
 string get_username ([string $part = null])
 int insert_identity (array $data)
 int insert_search (array $data)
 array list_identities ([string $sql_add = ''])
 array list_searches (int $type)
 void reset ()
 boolean save_prefs (array $a_user_prefs)
 void set_default (int $iid)
 void touch ()
 boolean update_identity (int $iid, array $data)
Variables
mixed $data (line 36)
  • access: public
mixed $ID (line 35)
  • access: public
mixed $language (line 37)
  • access: public
Methods
static create (line 430)

Create a new user record and return a rcube_user instance

  • return: New user instance
rcube_user create (string $user, string $host)
  • string $user: IMAP user name
  • string $host: IMAP host
static email2user (line 528)

Resolve username using a virtuser plugins

  • return: Resolved IMAP username
string email2user (string $email)
  • string $email: E-mail address to resolve
static query (line 401)

Find a user record matching the given name and host

  • return: New user instance
rcube_user query (string $user, string $host)
  • string $user: IMAP user name
  • string $host: IMAP host name
static user2email (line 546)

Resolve e-mail address from virtuser plugins

  • return: Resolved e-mail address string or array of strings
mixed user2email (string $user, [boolean $first = true], [boolean $extended = false])
  • string $user: User name
  • boolean $first: If true returns first found entry
  • boolean $extended: If true returns email as array (email and name for identity)
Constructor __construct (line 62)

Object constructor

rcube_user __construct ([int $id = null], [array $sql_arr = null])
  • int $id: User id
  • array $sql_arr: SQL result set
delete_identity (line 321)

Mark the given identity as deleted

  • return: True if deleted successfully, false if nothing changed
boolean delete_identity (int $iid)
  • int $iid: Identity ID
delete_search (line 635)

Deletes given saved search record

  • return: True if deleted successfully, false if nothing changed
boolean delete_search (int $sid)
  • int $sid: Search ID
get_identity (line 217)

Get default identity of this user

  • return: Hash array with all cols of the identity record
array get_identity ([int $id = null])
  • int $id: Identity ID. If empty, the default identity is returned
get_prefs (line 120)

Get the preferences saved for this user

  • return: Hash array with prefs
array get_prefs ()
get_search (line 598)

Return saved search data.

  • return: Data
array get_search (int $id)
  • int $id: Row identifier
get_username (line 87)

Build a user name string (as e-mail address)

  • return: Full user name or its part
string get_username ([string $part = null])
  • string $part: Username part (empty or 'local' or 'domain')
insert_identity (line 289)

Create a new identity record linked with this user

  • return: The inserted identity ID or false on error
int insert_identity (array $data)
  • array $data: Hash array with col->value pairs to save
insert_search (line 657)

Create a new saved search record linked with this user

  • return: The inserted search ID or false on error
int insert_search (array $data)
  • array $data: Hash array with col->value pairs to save
list_identities (line 230)

Return a list of all identities linked with this user

  • return: List of identities
array list_identities ([string $sql_add = ''])
  • string $sql_add: Optional WHERE clauses
list_searches (line 564)

Return a list of saved searches linked with this user

  • return: List of saved searches indexed by search ID
array list_searches (int $type)
  • int $type: Search type
reset (line 387)

Clear the saved object state

void reset ()
save_prefs (line 155)

Write the given user prefs to the user's record

  • return: True on success, False on failure
boolean save_prefs (array $a_user_prefs)
  • array $a_user_prefs: User prefs to save
set_default (line 354)

Make this identity the default one for this user

void set_default (int $iid)
  • int $iid: The identity ID
touch (line 372)

Update user's last_login timestamp

void touch ()
update_identity (line 256)

Update a specific identity record

  • return: True if saved successfully, false if nothing changed
boolean update_identity (int $iid, array $data)
  • int $iid: Identity ID
  • array $data: Hash array with col->value pairs to save
Class Constants
SEARCH_ADDRESSBOOK = 1 (line 53)
SEARCH_MAIL = 2 (line 54)

Documentation generated on Wed, 23 May 2012 16:40:54 +0200 by phpDocumentor 1.4.4