4define(
"IL_MAIL_LOCAL", 0);
 
    5define(
"IL_MAIL_EMAIL", 1);
 
    6define(
"IL_MAIL_BOTH", 2);
 
   52                define(
"DEFAULT_LINEBREAK",60);
 
   55                $this->table_mail_options = 
'mail_options';
 
   57                $this->user_id = $a_user_id;
 
   71            $ilDB->insert(
'mail_options',
 
   73                                                'user_id'              => array(
'integer', $this->user_id),
 
   74                                                'linebreak'            => array(
'integer', DEFAULT_LINEBREAK),
 
   75                                                'signature'            => array(
'text', NULL),
 
   76                                                'incoming_type'        => array(
'integer', $incomingMail),
 
   77                                                'cronjob_notification' => array(
'integer', 0)
 
   95                        SELECT * FROM '.$this->table_mail_options.
' 
   97                        array(
'integer'), array($this->user_id));
 
  101                $this->cronjob_notification = stripslashes(
$row->cronjob_notification);
 
  102                $this->signature = stripslashes(
$row->signature);
 
  103                $this->linebreak = stripslashes(
$row->linebreak);
 
  104                $this->incoming_type = 
$row->incoming_type;
 
  122        public function updateOptions($a_signature, $a_linebreak, $a_incoming_type, $a_cronjob_notification)
 
  130                $this->cronjob_notification = $a_cronjob_notification;
 
  131                $this->signature            = $a_signature;
 
  132                $this->linebreak            = $a_linebreak;
 
  133                $this->incoming_type        = $a_incoming_type;
 
  136                        'signature'     => array(
'text', $this->signature),
 
  137                        'linebreak'     => array(
'integer', $this->linebreak),
 
  138                        'incoming_type' => array(
'integer', $this->incoming_type)
 
  142                        $data[
'cronjob_notification']  = array(
'integer', $this->cronjob_notification);
 
  146                        $data[
'cronjob_notification']  = array(
'integer', self::lookupNotificationSetting($this->user_id));
 
  150                        $this->table_mail_options,
 
  152                                'user_id' => array(
'integer', $this->user_id)
 
  197        protected static function lookupNotificationSetting($usr_id)
 
  204                $query = 
"SELECT cronjob_notification FROM mail_options WHERE user_id = " . 
$ilDB->quote($usr_id, 
'integer');
 
  206                return (
int)
$row[
'cronjob_notification'];
 
An exception for terminatinating execution or to throw for unit testing.
Class UserMail this class handles user mails.
__construct($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()
getOptions()
get options of user and set variables $signature and $linebreak this method shouldn't bew called from...
getLinebreak()
get linebreak of user @access public
getSignature()
get signature of user @access public
static _lookupEmail($a_user_id)
Lookup email.
redirection script todo: (a better solution should control the processing via a xml file)