Guest User

Untitled

a guest
Apr 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?
  2.  
  3. class Tx_Projectplanner_Service_AccessControlService implements t3lib_Singleton {
  4.  
  5. public function isLoggedIn ($person = NULL) {
  6. if (is_object($person)) {
  7. if ($person->getUid() == $this->getFrontendUserUid()) {
  8. return TRUE;
  9. }
  10. }
  11. return FALSE;
  12. }
  13.  
  14. public function getFrontendUserUid () {
  15. if ($this->hasLoggedInFrontendUser() && !empty($GLOBALS['TSFE']->fe_user->user['uid'])) {
  16. return intval($GLOBALS['TSFE']->fe_user->user['uid']);
  17. }
  18. return NULL;
  19. }
  20.  
  21. public function hasLoggedInFrontendUser () {
  22. return $GLOBALS['TSFE']->loginUser === 1 ? TRUE : FALSE;
  23. }
  24.  
  25. }
  26.  
  27. ?>
Add Comment
Please, Sign In to add comment