Esempio n. 1
0
 /**
  * Returns TRUE only if a FrontendUser is currently logged in. Use argument
  * to return TRUE only if the FrontendUser logged in must be that specific user.
  *
  * @param Tx_Extbase_Domain_Model_FrontendUser $frontendUser
  * @return boolean
  * @api
  */
 public function assertFrontendUserLoggedIn(Tx_Extbase_Domain_Model_FrontendUser $frontendUser = NULL)
 {
     $currentFrontendUser = $this->userService->getCurrentFrontendUser();
     if (!$currentFrontendUser) {
         return FALSE;
     }
     if ($frontendUser && $currentFrontendUser) {
         if ($currentFrontendUser->getUid() === $frontendUser->getUid()) {
             return TRUE;
         } else {
             return FALSE;
         }
     }
     return is_object($currentFrontendUser);
 }
Esempio n. 2
0
	/**
	 * __construct
	 *
	 * @return void
	 */
	public function __construct() {
		parent::__construct();
	}
Esempio n. 3
0
 /**
  * Creates a new item object and persists it
  * so that we have an UID for it.
  *
  * @return Tx_Yag_Domain_Model_Item Persisted item
  */
 protected function getNewPersistedItem()
 {
     $item = $this->objectManager->get('Tx_Yag_Domain_Model_Item');
     if ($this->feUser) {
         $item->setFeUserUid($this->feUser->getUid());
     }
     $this->itemRepository->add($item);
     $this->persistenceManager->persistAll();
     return $item;
 }
Esempio n. 4
0
 public function __construct($username = '', $password = '')
 {
     $this->forgotHashValid = new DateTime();
     parent::__construct($username, $password);
 }