|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* YAWIK |
|
4
|
|
|
* |
|
5
|
|
|
* @filesource |
|
6
|
|
|
* @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de) |
|
7
|
|
|
* @license MIT |
|
8
|
|
|
* @author [email protected] |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace Auth\Options; |
|
12
|
|
|
|
|
13
|
|
|
use Zend\Stdlib\AbstractOptions; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* Class ModuleOptions |
|
17
|
|
|
* |
|
18
|
|
|
* defines AbstractOptions of the Auth Module |
|
19
|
|
|
*/ |
|
20
|
|
|
class ModuleOptions extends AbstractOptions |
|
21
|
|
|
{ |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* default email address, which is used in FROM headers of system mails like "new registration", |
|
25
|
|
|
* "forgot password",.. |
|
26
|
|
|
* |
|
27
|
|
|
* @var string |
|
28
|
|
|
*/ |
|
29
|
|
|
protected $fromEmail = '[email protected]'; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* default name, which is used in FROM headers of system mails like "new registration", "forgot password",.. |
|
33
|
|
|
* |
|
34
|
|
|
* @var string |
|
35
|
|
|
*/ |
|
36
|
|
|
protected $fromName = 'Name'; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* default role, which is assigned to a user after registration. possible Values (user|recruiter) |
|
40
|
|
|
* @var string |
|
41
|
|
|
*/ |
|
42
|
|
|
protected $role = 'recruiter'; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* Subject of the registration mail. |
|
46
|
|
|
* |
|
47
|
|
|
* @var string |
|
48
|
|
|
*/ |
|
49
|
|
|
protected $mailSubjectRegistration = 'Welcome to YAWIK'; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* an authSuffix can be used, if you plan to connect an external system. Users can login with "username", but |
|
53
|
|
|
* the login itself is stored as "username@authSuffix" |
|
54
|
|
|
* |
|
55
|
|
|
* @var string |
|
56
|
|
|
*/ |
|
57
|
|
|
protected $authSuffix = ''; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Enable Login via Social Networks |
|
61
|
|
|
* |
|
62
|
|
|
* @var array() |
|
63
|
|
|
*/ |
|
64
|
|
|
protected $enableLogins = ['facebook','xing','linkedin','google','github']; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* Enable Registration |
|
68
|
|
|
* |
|
69
|
|
|
* @var bool |
|
70
|
|
|
*/ |
|
71
|
|
|
protected $enableRegistration = true; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Enable to reset the password |
|
75
|
|
|
* |
|
76
|
|
|
* @var bool |
|
77
|
|
|
*/ |
|
78
|
|
|
protected $enableResetPassword = true; |
|
79
|
|
|
|
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* Sets the "role " option |
|
83
|
|
|
* |
|
84
|
|
|
* @param $role |
|
85
|
|
|
* @return $this |
|
86
|
|
|
*/ |
|
87
|
|
|
public function setRole($role) |
|
88
|
|
|
{ |
|
89
|
|
|
$this->role = $role; |
|
90
|
|
|
return $this; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
/** |
|
94
|
|
|
* Gets the "role" option |
|
95
|
|
|
* |
|
96
|
|
|
* @return string |
|
97
|
|
|
*/ |
|
98
|
|
|
public function getRole() |
|
99
|
|
|
{ |
|
100
|
|
|
return $this->role; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* Gets email address which is used in FROM header of system mails |
|
105
|
|
|
* |
|
106
|
|
|
* @return string |
|
107
|
|
|
*/ |
|
108
|
|
|
public function getFromEmail() |
|
109
|
|
|
{ |
|
110
|
|
|
return $this->fromEmail; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* Sets email address which is used in FROM header of system mails |
|
115
|
|
|
* |
|
116
|
|
|
* @param $fromEmail |
|
117
|
|
|
* @return $this |
|
118
|
|
|
*/ |
|
119
|
|
|
public function setFromEmail($fromEmail) |
|
120
|
|
|
{ |
|
121
|
|
|
$this->fromEmail = $fromEmail; |
|
122
|
|
|
return $this; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* Gets the From: Name of the mail header |
|
127
|
|
|
* |
|
128
|
|
|
* @return string |
|
129
|
|
|
*/ |
|
130
|
|
|
public function getFromName() |
|
131
|
|
|
{ |
|
132
|
|
|
return $this->fromName; |
|
133
|
|
|
} |
|
134
|
|
|
|
|
135
|
|
|
/** |
|
136
|
|
|
* Sets the From: of the mail header |
|
137
|
|
|
* |
|
138
|
|
|
* @param $fromName |
|
139
|
|
|
* @return $this |
|
140
|
|
|
*/ |
|
141
|
|
|
public function setFromName($fromName) |
|
142
|
|
|
{ |
|
143
|
|
|
$this->fromName = $fromName; |
|
144
|
|
|
return $this; |
|
145
|
|
|
} |
|
146
|
|
|
|
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* Sets the Mail Subject of the registration Mail |
|
150
|
|
|
* |
|
151
|
|
|
* @param $mailSubjectRegistration |
|
152
|
|
|
* @return $this |
|
153
|
|
|
*/ |
|
154
|
|
|
public function setMailSubjectRegistration($mailSubjectRegistration) |
|
155
|
|
|
{ |
|
156
|
|
|
$this->mailSubjectRegistration = $mailSubjectRegistration; |
|
157
|
|
|
return $this; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* Gets the Mail Subject of the registration Mail |
|
162
|
|
|
* |
|
163
|
|
|
* @return string |
|
164
|
|
|
*/ |
|
165
|
|
|
public function getMailSubjectRegistration() |
|
166
|
|
|
{ |
|
167
|
|
|
return $this->mailSubjectRegistration; |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
/** |
|
171
|
|
|
* @param $suffix |
|
172
|
|
|
* @return $this |
|
173
|
|
|
*/ |
|
174
|
|
|
public function setAuthSuffix($suffix) |
|
175
|
|
|
{ |
|
176
|
|
|
$this->authSuffix = $suffix; |
|
177
|
|
|
return $this; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* @return string |
|
182
|
|
|
*/ |
|
183
|
|
|
public function getAuthSuffix() |
|
184
|
|
|
{ |
|
185
|
|
|
return $this->authSuffix; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* @param $enableLogins |
|
190
|
|
|
* @return $this |
|
191
|
|
|
*/ |
|
192
|
|
|
public function setEnableLogins($enableLogins) |
|
193
|
|
|
{ |
|
194
|
|
|
$this->enableLogins = $enableLogins; |
|
195
|
|
|
return $this; |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
/** |
|
199
|
|
|
* @return array() |
|
|
|
|
|
|
200
|
|
|
*/ |
|
201
|
|
|
public function getEnableLogins() |
|
202
|
|
|
{ |
|
203
|
|
|
return $this->enableLogins; |
|
204
|
|
|
} |
|
205
|
|
|
|
|
206
|
|
|
/** |
|
207
|
|
|
* @param $enableRegistration |
|
208
|
|
|
* @return $this |
|
209
|
|
|
*/ |
|
210
|
|
|
public function setEnableRegistration($enableRegistration) |
|
211
|
|
|
{ |
|
212
|
|
|
$this->enableRegistration = $enableRegistration; |
|
213
|
|
|
return $this; |
|
214
|
|
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* @return bool |
|
218
|
|
|
*/ |
|
219
|
|
|
public function getEnableRegistration() |
|
|
|
|
|
|
220
|
|
|
{ |
|
221
|
|
|
return $this->enableRegistration; |
|
222
|
|
|
} |
|
223
|
|
|
|
|
224
|
|
|
/** |
|
225
|
|
|
* @param $enableResetPassword |
|
226
|
|
|
* @return $this |
|
227
|
|
|
*/ |
|
228
|
|
|
public function setEnableResetPassword($enableResetPassword) |
|
229
|
|
|
{ |
|
230
|
|
|
$this->enableResetPassword = $enableResetPassword; |
|
231
|
|
|
return $this; |
|
232
|
|
|
} |
|
233
|
|
|
|
|
234
|
|
|
/** |
|
235
|
|
|
* @return bool |
|
236
|
|
|
*/ |
|
237
|
|
|
public function getEnableResetPassword() |
|
|
|
|
|
|
238
|
|
|
{ |
|
239
|
|
|
return $this->enableResetPassword; |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
} |
|
243
|
|
|
|
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.