Class UserMail this class handles user mails. More...
Public Member Functions | |
| ilMailOptions ($a_user_id) | |
| Constructor setup an mail object. | |
| createMailOptionsEntry () | |
| create entry in table_mail_options for a new user this method should only be called from createUser() public | |
| getOptions () | |
| get options of user and set variables $signature and $linebreak this method shouldn't bew called from outside use getSignature() and getLinebreak() private | |
| updateOptions ($a_signature, $a_linebreak, $a_incoming_type, $a_cronjob_notification) | |
| update user options | |
| getLinebreak () | |
| get linebreak of user public | |
| getSignature () | |
| get signature of user public | |
| getIncomingType () | |
| setCronjobNotification () | |
| getCronjobNotification () | |
Data Fields | |
| $ilias | |
| $LOCAL = 0 | |
| $EMAIL = 1 | |
| $BOTH = 2 | |
| $linebreak | |
| $signature | |
| $incoming_type | |
| $cronjob_notification | |
Class UserMail this class handles user mails.
Definition at line 37 of file class.ilMailOptions.php.
| ilMailOptions::createMailOptionsEntry | ( | ) |
create entry in table_mail_options for a new user this method should only be called from createUser() public
Definition at line 87 of file class.ilMailOptions.php.
References $res.
{
global $ilDB;
/* Get setting for incoming mails */
if (!($incomingMail = $this->ilias->getSetting("mail_incoming_mail")))
{
/* No setting found -> set it to "local and forwarding" [2] */
$incomingMail = IL_MAIL_BOTH;
}
$query = "INSERT INTO $this->table_mail_options " .
"VALUES(" . $ilDB->quote($this->user_id) . ", " .
$ilDB->quote(DEFAULT_LINEBREAK) . ", '', " .
$ilDB->quote($incomingMail) . ", '0')";
$res = $this->ilias->db->query($query);
return true;
}
| ilMailOptions::getCronjobNotification | ( | ) |
Definition at line 199 of file class.ilMailOptions.php.
{
return $this->cronjob_notification;
}
| ilMailOptions::getIncomingType | ( | ) |
Definition at line 190 of file class.ilMailOptions.php.
{
return $this->incoming_type;
}
| ilMailOptions::getLinebreak | ( | ) |
get linebreak of user public
Definition at line 175 of file class.ilMailOptions.php.
{
return $this->linebreak;
}
| ilMailOptions::getOptions | ( | ) |
get options of user and set variables $signature and $linebreak this method shouldn't bew called from outside use getSignature() and getLinebreak() private
Definition at line 114 of file class.ilMailOptions.php.
References ilObjUser::_lookupEmail().
Referenced by ilMailOptions().
{
global $ilDB;
$query = "SELECT * FROM $this->table_mail_options ".
"WHERE user_id = ".$ilDB->quote($this->user_id)." ";
$row = $this->ilias->db->getRow($query,DB_FETCHMODE_OBJECT);
$this->cronjob_notification = stripslashes($row->cronjob_notification);
$this->signature = stripslashes($row->signature);
$this->linebreak = stripslashes($row->linebreak);
$this->incoming_type = $row->incoming_type;
if(!strlen(ilObjUser::_lookupEmail($this->user_id)))
{
$this->incoming_type = $this->LOCAL;
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMailOptions::getSignature | ( | ) |
get signature of user public
Definition at line 185 of file class.ilMailOptions.php.
{
return $this->signature;
}
| ilMailOptions::ilMailOptions | ( | $ | a_user_id | ) |
Constructor setup an mail object.
| int | user_id public |
Definition at line 68 of file class.ilMailOptions.php.
References $ilias, and getOptions().
{
global $ilias;
define("DEFAULT_LINEBREAK",60);
$this->ilias =& $ilias;
$this->table_mail_options = 'mail_options';
$this->user_id = $a_user_id;
$this->getOptions();
}
Here is the call graph for this function:| ilMailOptions::setCronjobNotification | ( | ) |
Definition at line 195 of file class.ilMailOptions.php.
{
return $this->cronjob_notification;
}
| ilMailOptions::updateOptions | ( | $ | a_signature, | |
| $ | a_linebreak, | |||
| $ | a_incoming_type, | |||
| $ | a_cronjob_notification | |||
| ) |
update user options
| string | Signature | |
| int | linebreak | |
| int | incoming_type | |
| int | cronjob_notification |
Definition at line 144 of file class.ilMailOptions.php.
{
global $ilDB, $ilias;
$query = 'UPDATE '.$this->table_mail_options.'
SET
signature = '.$ilDB->quote($a_signature).',
linebreak = '.$ilDB->quote($a_linebreak).', ';
if ($ilias->getSetting('mail_notification'))
{
$query .= 'cronjob_notification = '.$ilDB->quote($a_cronjob_notification).', ';
}
$query .='incoming_type = '.$ilDB->quote($a_incoming_type).'
WHERE 1
AND user_id = '.$ilDB->quote($this->user_id).' ';
$res = $this->ilias->db->query($query);
$this->cronjob_notification = $a_cronjob_notification;
$this->signature = $a_signature;
$this->linebreak = $a_linebreak;
$this->incoming_type = $a_incoming_type;
return true;
}
| ilMailOptions::$BOTH = 2 |
Definition at line 44 of file class.ilMailOptions.php.
| ilMailOptions::$cronjob_notification |
Definition at line 60 of file class.ilMailOptions.php.
| ilMailOptions::$EMAIL = 1 |
Definition at line 43 of file class.ilMailOptions.php.
| ilMailOptions::$ilias |
Definition at line 39 of file class.ilMailOptions.php.
Referenced by ilMailOptions(), and updateOptions().
| ilMailOptions::$incoming_type |
Definition at line 59 of file class.ilMailOptions.php.
| ilMailOptions::$linebreak |
Definition at line 51 of file class.ilMailOptions.php.
| ilMailOptions::$LOCAL = 0 |
Definition at line 42 of file class.ilMailOptions.php.
| ilMailOptions::$signature |
Definition at line 58 of file class.ilMailOptions.php.
1.7.1