Create a new user record and return a rcube_user instance
-
string
$user: IMAP user name
-
string
$host: IMAP host
Resolve username using a virtuser plugins
string
email2user
(string $email)
-
string
$email: E-mail address to resolve
Find a user record matching the given name and host
-
string
$user: IMAP user name
-
string
$host: IMAP host name
Resolve e-mail address from virtuser plugins
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)
Object constructor
rcube_user
__construct
([int $id = null], [array $sql_arr = null])
-
int
$id: User id
-
array
$sql_arr: SQL result set
Mark the given identity as deleted
boolean
delete_identity
(int $iid)
Deletes given saved search record
boolean
delete_search
(int $sid)
Get default identity of this user
array
get_identity
([int $id = null])
-
int
$id: Identity ID. If empty, the default identity is returned
Get the preferences saved for this user
array
get_prefs
()
Return saved search data.
array
get_search
(int $id)
Build a user name string (as e-mail address)
string
get_username
([string $part = null])
-
string
$part: Username part (empty or 'local' or 'domain')
Create a new identity record linked with this user
int
insert_identity
(array $data)
-
array
$data: Hash array with col->value pairs to save
Create a new saved search record linked with this user
int
insert_search
(array $data)
-
array
$data: Hash array with col->value pairs to save
Return a list of all identities linked with this user
array
list_identities
([string $sql_add = ''])
-
string
$sql_add: Optional WHERE clauses
Return a list of saved searches linked with this user
array
list_searches
(int $type)
Clear the saved object state
void
reset
()
Write the given user prefs to the user's record
boolean
save_prefs
(array $a_user_prefs)
-
array
$a_user_prefs: User prefs to save
Make this identity the default one for this user
void
set_default
(int $iid)
-
int
$iid: The identity ID
Update user's last_login timestamp
void
touch
()
Update a specific identity record
boolean
update_identity
(int $iid, array $data)
-
int
$iid: Identity ID
-
array
$data: Hash array with col->value pairs to save