ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMailOptions Class Reference

Class UserMail this class handles user mails. More...

+ Collaboration diagram for ilMailOptions:

Public Member Functions

 __construct ($a_user_id)
 Constructor setup an mail object. More...
 
 createMailOptionsEntry ()
 create entry in table_mail_options for a new user this method should only be called from createUser() More...
 
 getOptions ()
 get options of user and set variables $signature and $linebreak this method shouldn't bew called from outside use getSignature() and getLinebreak() private More...
 
 getLinebreak ()
 get linebreak of user public More...
 
 getSignature ()
 get signature of user public More...
 
 getIncomingType ()
 
 setCronjobNotification ()
 
 getCronjobNotification ()
 

Data Fields

 $ilias
 
 $LOCAL = 0
 
 $EMAIL = 1
 
 $BOTH = 2
 
 $linebreak
 
 $signature
 
 $incoming_type
 
 $cronjob_notification
 

Detailed Description

Class UserMail this class handles user mails.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 17 of file class.ilMailOptions.php.

Constructor & Destructor Documentation

◆ __construct()

ilMailOptions::__construct (   $a_user_id)

Constructor setup an mail object.

Parameters
intuser_id public

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

References $ilias, and getOptions().

49  {
50  global $ilias;
51 
52  define("DEFAULT_LINEBREAK",60);
53 
54  $this->ilias = $ilias;
55  $this->table_mail_options = 'mail_options';
56 
57  $this->user_id = $a_user_id;
58  $this->getOptions();
59  }
getOptions()
get options of user and set variables $signature and $linebreak this method shouldn't bew called from...
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

Member Function Documentation

◆ createMailOptionsEntry()

ilMailOptions::createMailOptionsEntry ( )

create entry in table_mail_options for a new user this method should only be called from createUser()

Returns
bool

Definition at line 66 of file class.ilMailOptions.php.

References $ilDB, $ilSetting, array, and IL_MAIL_LOCAL.

67  {
68  global $ilDB, $ilSetting;
69 
70  $incomingMail = $ilSetting->get('mail_incoming_mail') ? $ilSetting->get('mail_incoming_mail'): IL_MAIL_LOCAL;
71  $ilDB->insert('mail_options',
72  array(
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)
78  ));
79 
80  return true;
81  }
const IL_MAIL_LOCAL
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
global $ilDB

◆ getCronjobNotification()

ilMailOptions::getCronjobNotification ( )

Definition at line 188 of file class.ilMailOptions.php.

References $cronjob_notification, $ilDB, $query, and $row.

189  {
191  }

◆ getIncomingType()

ilMailOptions::getIncomingType ( )

Definition at line 179 of file class.ilMailOptions.php.

References $incoming_type.

Referenced by ilMailOptionsGUI\setMailOptionsValuesByDB(), and ilPersonalSettingsGUI\setMailOptionsValuesByDB().

180  {
181  return $this->incoming_type;
182  }
+ Here is the caller graph for this function:

◆ getLinebreak()

ilMailOptions::getLinebreak ( )

get linebreak of user public

Returns
array mails

Definition at line 164 of file class.ilMailOptions.php.

References $linebreak.

165  {
166  return $this->linebreak;
167  }

◆ getOptions()

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

Returns
boolean

Definition at line 90 of file class.ilMailOptions.php.

References $data, $ilDB, $ilSetting, $LOCAL, $res, $row, ilObjUser\_lookupEmail(), array, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by __construct().

91  {
92  global $ilDB;
93 
94  $res = $ilDB->queryf('
95  SELECT * FROM '.$this->table_mail_options.'
96  WHERE user_id = %s',
97  array('integer'), array($this->user_id));
98 
100 
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;
105 
106  if(!strlen(ilObjUser::_lookupEmail($this->user_id)))
107  {
108  $this->incoming_type = $this->LOCAL;
109  }
110 
111  return true;
112  }
Create styles array
The data for the language used.
static _lookupEmail($a_user_id)
Lookup email.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSignature()

ilMailOptions::getSignature ( )

get signature of user public

Returns
array mails

Definition at line 174 of file class.ilMailOptions.php.

References $signature.

175  {
176  return $this->signature;
177  }

◆ setCronjobNotification()

ilMailOptions::setCronjobNotification ( )

Definition at line 184 of file class.ilMailOptions.php.

References $cronjob_notification.

185  {
187  }

Field Documentation

◆ $BOTH

ilMailOptions::$BOTH = 2

Definition at line 24 of file class.ilMailOptions.php.

◆ $cronjob_notification

ilMailOptions::$cronjob_notification

Definition at line 40 of file class.ilMailOptions.php.

Referenced by getCronjobNotification(), and setCronjobNotification().

◆ $EMAIL

ilMailOptions::$EMAIL = 1

Definition at line 23 of file class.ilMailOptions.php.

◆ $ilias

ilMailOptions::$ilias

Definition at line 19 of file class.ilMailOptions.php.

Referenced by __construct().

◆ $incoming_type

ilMailOptions::$incoming_type

Definition at line 39 of file class.ilMailOptions.php.

Referenced by getIncomingType().

◆ $linebreak

ilMailOptions::$linebreak

Definition at line 31 of file class.ilMailOptions.php.

Referenced by getLinebreak().

◆ $LOCAL

ilMailOptions::$LOCAL = 0

Definition at line 22 of file class.ilMailOptions.php.

Referenced by getOptions().

◆ $signature

ilMailOptions::$signature

Definition at line 38 of file class.ilMailOptions.php.

Referenced by getSignature().


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