TYPO3 CMS  TYPO3_6-2
BackendUser.php
Go to the documentation of this file.
1 <?php
3 
22 
27  protected $userName = '';
28 
32  protected $isAdministrator = FALSE;
33 
37  protected $isDisabled = FALSE;
38 
42  protected $startDateAndTime = NULL;
43 
47  protected $endDateAndTime = NULL;
48 
52  protected $email = '';
53 
57  protected $realName = '';
58 
63 
67  protected $ipLockIsDisabled = FALSE;
68 
74  public function getUserName() {
75  return $this->userName;
76  }
77 
84  public function setUserName($userName) {
85  $this->userName = $userName;
86  }
87 
93  public function getIsAdministrator() {
95  }
96 
104  $this->isAdministrator = $isAdministrator;
105  }
106 
112  public function getIsDisabled() {
113  return $this->isDisabled;
114  }
115 
122  public function setIsDisabled($isDisabled) {
123  $this->isDisabled = $isDisabled;
124  }
125 
131  public function getStartDateAndTime() {
133  }
134 
141  public function setStartDateAndTime(\DateTime $dateAndTime = NULL) {
142  $this->startDateAndTime = $dateAndTime;
143  }
144 
150  public function getEndDateAndTime() {
151  return $this->endDateAndTime;
152  }
153 
160  public function setEndDateAndTime(\DateTime $dateAndTime = NULL) {
161  $this->endDateAndTime = $dateAndTime;
162  }
163 
169  public function getEmail() {
170  return $this->email;
171  }
172 
179  public function setEmail($email) {
180  $this->email = $email;
181  }
182 
188  public function getRealName() {
189  return $this->realName;
190  }
191 
197  public function setRealName($name) {
198  $this->realName = $name;
199  }
200 
208  public function isActivated() {
209  return !$this->getIsDisabled() && $this->isActivatedViaStartDateAndTime() && $this->isActivatedViaEndDateAndTime();
210  }
211 
217  protected function isActivatedViaStartDateAndTime() {
218  if ($this->getStartDateAndTime() === NULL) {
219  return TRUE;
220  }
221  $now = new \DateTime('now');
222  return $this->getStartDateAndTime() <= $now;
223  }
224 
230  protected function isActivatedViaEndDateAndTime() {
231  if ($this->getEndDateAndTime() === NULL) {
232  return TRUE;
233  }
234  $now = new \DateTime('now');
235  return $now <= $this->getEndDateAndTime();
236  }
237 
244  public function setIpLockIsDisabled($disableIpLock) {
245  $this->ipLockIsDisabled = $disableIpLock;
246  }
247 
253  public function getIpLockIsDisabled() {
255  }
256 
262  public function getLastLoginDateAndTime() {
264  }
265 
272  public function setLastLoginDateAndTime(\DateTime $dateAndTime = NULL) {
273  $this->lastLoginDateAndTime = $dateAndTime;
274  }
275 }
setLastLoginDateAndTime(\DateTime $dateAndTime=NULL)
setStartDateAndTime(\DateTime $dateAndTime=NULL)
setEndDateAndTime(\DateTime $dateAndTime=NULL)