ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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() @access private More...
 
 getLinebreak ()
 get linebreak of user @access public More...
 
 getSignature ()
 get signature of user @access 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 @access public

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

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)

References $ilias, and getOptions().

+ 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.

67 {
68 global $ilDB, $ilSetting;
69
70 $incomingMail = $ilSetting->get('mail_incoming_mail', IL_MAIL_BOTH);
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_BOTH
global $ilSetting
Definition: privfeed.php:40
global $ilDB

References $ilDB, $ilSetting, and IL_MAIL_BOTH.

◆ getCronjobNotification()

ilMailOptions::getCronjobNotification ( )

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

189 {
191 }

References $cronjob_notification.

◆ getIncomingType()

ilMailOptions::getIncomingType ( )

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

180 {
182 }

References $incoming_type.

◆ getLinebreak()

ilMailOptions::getLinebreak ( )

get linebreak of user @access public

Returns
array mails

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

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

References $linebreak.

◆ 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() @access private

Returns
boolean

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

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
99 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
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 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
_lookupEmail($a_user_id)
Lookup email.

References $ilDB, $LOCAL, $res, $row, ilObjUser\_lookupEmail(), and DB_FETCHMODE_OBJECT.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSignature()

ilMailOptions::getSignature ( )

get signature of user @access public

Returns
array mails

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

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

References $signature.

◆ setCronjobNotification()

ilMailOptions::setCronjobNotification ( )

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

185 {
187 }

References $cronjob_notification.

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: