コード例 #1
0
 /**
  * Initializes the myUser object.
  *
  * @param sfEventDispatcher $dispatcher The event dispatcher object
  * @param sfStorage $storage The session storage object
  * @param array $options An array of options
  */
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     parent::initialize($dispatcher, $storage, $options);
     if (!$this->isAuthenticated()) {
         $this->_user_id = null;
     }
 }
コード例 #2
0
 public function getUsername()
 {
     if ($this->isAuthenticated()) {
         return parent::getUsername();
     }
     return 'Anonymous@' . $_SERVER['REMOTE_ADDR'];
 }
コード例 #3
0
ファイル: myUser.class.php プロジェクト: eldister/dosye
 public function hasPermission($permissions, $useAnd = true)
 {
     if (!is_array($permissions)) {
         return parent::hasPermission($permissions);
     }
     // now we assume that $permissions is an array
     $test = false;
     foreach ($permissions as $permission) {
         // recursively check the permission with a switched AND/OR mode
         $test = self::hasPermission($permission, $useAnd ? false : true);
         if ($useAnd) {
             $test = $test ? false : true;
         }
         if ($test) {
             // either passed one in OR mode or failed one in AND mode
             break;
             // the matter is settled
         }
     }
     if ($useAnd) {
         // in AND mode we succeed if $test is false
         $test = $test ? false : true;
     }
     return $test;
 }
コード例 #4
0
ファイル: sfUTCCASUser.class.php プロジェクト: TheoJD/portail
 /**
  * Logout the user form the current symfony application and from the
  *  CAS server
  * @param  boolean $onlyLocal   Set it to true, to logout from the application, but stay login in the CAS
  */
 public function logout($url = null, $onlyLocal = false)
 {
     parent::signOut();
     $this->username = null;
     if (!$onlyLocal) {
         sfCAS::initPhpCAS();
         if (!empty($url)) {
             phpCAS::logoutWithUrl($url);
         } else {
             phpCas::logout();
         }
     }
 }
コード例 #5
0
 public function signIn($user, $remember = false, $con = null)
 {
     $return = parent::signIn($user, $remember, $con);
     bhLDAP::debug("########  hello bhLDAPAuthSecurityUser.class.php signIn()!");
     // signin
     # This either sets or overrides the parent::signIn function above
     #$this->setAttribute('user_id', $user->getId(), 'sfGuardSecurityUser');
     #$this->setAuthenticated(true);
     #$this->clearCredentials();
     #$this->addCredentials($user->getAllPermissionNames());
     bhLDAP::debug("######## bhLDAPAuthSecurityUser id: " . $user->getID());
     bhLDAP::debug("######## bhLDAPAuthSecurityUser Clearing Credentials...");
     $this->clearCredentials();
     bhLDAP::debug("######## bhLDAPAuthSecurityUser Fetching Credentials...");
     //bhLDAP::debugDump($user, "######## $user");
     $credentials = bhLDAP::getUserCredentials($user);
     bhLDAP::debug("######## bhLDAPAuthSecurityUser Adding Credentials...");
     $this->addCredentials($credentials);
     bhLDAP::debug("######## bhLDAPAuthSecurityUser return...");
     //    die();
     return $return;
 }
コード例 #6
0
 public function signOut()
 {
     $this->_isEditMode = null;
     return parent::signOut();
 }
コード例 #7
0
ファイル: myUser.class.php プロジェクト: nurihan007/amaranto
 public function signIn($user, $remember = false, $con = null)
 {
     $this->setAttribute('email', $user->getEmail(), 'sfGuardSecurityUser');
     $this->setAttribute('person_id', $user->getProfile()->getId(), 'sfGuardSecurityUser');
     parent::signIn($user, $remember, $con);
 }
コード例 #8
0
 public function signIn($user, $remember = false, $con = null, $facebookAuthenticated = false)
 {
     $this->setFacebookAuthenticated($facebookAuthenticated);
     return parent::signIn($user, $remember, $con);
 }
コード例 #9
0
ファイル: aSecurityUser.class.php プロジェクト: verenate/gri
 function clearCredentials()
 {
     parent::clearCredentials();
     $this->getAttributeHolder()->removeNamespace('apostrophe');
 }
コード例 #10
0
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     // disable timeout
     $options['timeout'] = false;
     parent::initialize($dispatcher, $storage, $options);
 }
コード例 #11
0
 public function getReferer($default)
 {
     if ($default) {
         return $default;
     }
     return parent::getReferer($default);
 }
コード例 #12
0
ファイル: myUser.class.php プロジェクト: szelpe/cukorka
 /**
  * Initializes the sfGuardSecurityUser object.
  *
  * @param sfEventDispatcher $dispatcher The event dispatcher object
  * @param sfStorage $storage The session storage object
  * @param array $options An array of options
  */
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     parent::initialize($dispatcher, $storage, $options);
     $this->setCulture('hu');
 }
コード例 #13
0
ファイル: myUser.class.php プロジェクト: rbolliger/otokou
 public function signOut()
 {
     $this->getAttributeHolder()->removeNamespace('admin_module');
     $this->getAttributeHolder()->removeNamespace('charts');
     parent::signOut();
 }
コード例 #14
0
ファイル: myUser.class.php プロジェクト: cpf/eBot-CSGO-Web
 public function hasCredential($credential, $useAnd = true)
 {
     return parent::hasCredential($credential, $useAnd) || parent::hasPermission($credential);
 }
コード例 #15
0
ファイル: myUser.class.php プロジェクト: nvidela/kimkelen
 public function signOut()
 {
     $this->setLoginRole(null);
     parent::signOut();
 }
コード例 #16
0
 public function getFirstname() 
 {
   return parent::getFirstname();
 }
コード例 #17
0
 public function signIn($user, $remember = false, $con = null)
 {
     parent::signIn($user, $remember, $con);
     $this->loadUserSettings();
 }
コード例 #18
0
ファイル: myUser.class.php プロジェクト: jnankin/makeaminyan
 public function signIn($user, $remember = false, $con = null)
 {
     parent::signIn($user, $remember, $con);
     $this->addCredentials($user->getGroups());
 }
コード例 #19
0
 public function signIn($user, $remember = false, $con = null)
 {
     parent::signIn($user, $remember, $con);
     $this->loadPreferences();
 }
コード例 #20
0
ファイル: myUser.class.php プロジェクト: jmiridis/atcsf1
 public function signOut()
 {
     $this->getAttributeHolder()->removeNamespace(self::$NS);
     parent::signOut();
 }