UserEmail class. More...

List of all members.

Public Member Functions

 showChildForItemForm ($canedit, $field_name)
 prepareInputForAdd ($input)
 post_updateItem ($history=1)
 Actions done after the UPDATE of the item in the database.
 post_addItem ()
 Actions done after the ADD of the item in the database.
 post_deleteFromDB ()
 Actions done after the DELETE of the item in the database.

Static Public Member Functions

static getTypeName ($nb=0)
 Return the localized name of the current Type Should be overloaded in each new class.
static getDefaultForUser ($users_id)
 Get default email for user.
static getAllForUser ($users_id)
 Get all emails for user.
static isEmailForUser ($users_id, $email)
 is an email of the user
static getJSCodeToAddForItemChild ($field_name, $child_count_js_var)
static showForUser (User $user)
 Show emails of a user.
static showAddEmailButton (User $user)
static getNameField ()

Public Attributes

 $auto_message_on_action = false
 Set false to desactivate automatic message on action.
 $dohistory = true
 Make an history of the changes.

Static Public Attributes

static $itemtype = 'User'
static $items_id = 'users_id'

Detailed Description

UserEmail class.

Definition at line 41 of file useremail.class.php.


Member Function Documentation

static getAllForUser ( users_id) [static]

Get all emails for user.

Parameters:
$users_iduser ID
Returns:
array of emails

Definition at line 89 of file useremail.class.php.

References $DB.

Referenced by User\getAllEmails().

static getDefaultForUser ( users_id) [static]

Get default email for user.

If no default email get first one

Parameters:
$users_iduser ID
Returns:
default email, empty if no email set

Definition at line 64 of file useremail.class.php.

References $DB.

Referenced by NotificationTarget\addToAddressesList(), User\getDefaultEmail(), NotificationTargetCommonITILObject\getLinkedUserByType(), NotificationTargetCommonITILObject\getOldAssignTechnicianAddress(), getUserName(), and Ticket\showFormHelpdesk().

static getJSCodeToAddForItemChild ( field_name,
child_count_js_var 
) [static]
Since:
version 0.84
Parameters:
$field_name
$child_count_js_var
Returns:
string

Reimplemented from CommonDBChild.

Definition at line 130 of file useremail.class.php.

static getNameField ( ) [static]
Since:
version 0.84
See also:
CommonDBTM::getNameField
Returns:
string

Reimplemented from CommonDBTM.

Definition at line 233 of file useremail.class.php.

static getTypeName ( nb = 0) [static]

Return the localized name of the current Type Should be overloaded in each new class.

Returns:
string

Reimplemented from CommonGLPI.

Definition at line 52 of file useremail.class.php.

References $nb, and _n().

static isEmailForUser ( users_id,
email 
) [static]

is an email of the user

Parameters:
$users_iduser ID
$emailstring email to check user ID
Returns:
boolean is this email set for the user ?

Definition at line 111 of file useremail.class.php.

References $DB.

Referenced by User\isEmail().

Actions done after the ADD of the item in the database.

Returns:
nothing

Reimplemented from CommonDBChild.

Definition at line 255 of file useremail.class.php.

References $DB, $query, and CommonDBTM\getTable().

Actions done after the DELETE of the item in the database.

Returns:
nothing

Reimplemented from CommonDBChild.

Definition at line 272 of file useremail.class.php.

References $DB, $query, and CommonDBTM\getTable().

post_updateItem ( history = 1)

Actions done after the UPDATE of the item in the database.

Since:
version 0.84
Parameters:
$historystore changes history ? (default 1)
Returns:
nothing

Reimplemented from CommonDBChild.

Definition at line 238 of file useremail.class.php.

References $DB, $query, and CommonDBTM\getTable().

prepareInputForAdd ( input)
Since:
version 0.84

Reimplemented from CommonDBChild.

Definition at line 210 of file useremail.class.php.

References $input, countElementsInTable(), and CommonDBTM\getTable().

static showAddEmailButton ( User user) [static]
showChildForItemForm ( canedit,
field_name 
)
Since:
version 0.84
Parameters:
$canedit
$field_name

Reimplemented from CommonDBChild.

Definition at line 145 of file useremail.class.php.

References __(), CommonDBTM\getID(), and CommonDBTM\isNewID().

static showForUser ( User user) [static]

Show emails of a user.

Parameters:
$userUser object
Returns:
nothing

Definition at line 178 of file useremail.class.php.

References CommonDBTM\can(), CommonDBTM\getID(), getLoginUserID(), and CommonDBChild\showChildsForItemForm().

Referenced by User\showForm(), and User\showMyForm().


Member Data Documentation

$auto_message_on_action = false

Set false to desactivate automatic message on action.

Reimplemented from CommonDBTM.

Definition at line 44 of file useremail.class.php.

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Definition at line 49 of file useremail.class.php.

$items_id = 'users_id' [static]

Reimplemented from CommonDBChild.

Definition at line 48 of file useremail.class.php.

$itemtype = 'User' [static]

Reimplemented from CommonDBChild.

Definition at line 47 of file useremail.class.php.


The documentation for this class was generated from the following file: