コード例 #1
0
ファイル: ShibbolethUser.php プロジェクト: Trideon/gigolo
 /**
  * Constructor.
  * Populates the object's members with given values.
  *
  * @param array $values A map of user attributes.
  * @param ShibbolethOptions $options The plugin configuration.
  */
 public function __construct(array $values, ShibbolethOptions $options)
 {
     $config = $options->GetShibbolethOptions();
     $this->_username = $this->GetValue($values, $config[ShibbolethConfig::USERNAME]);
     $this->_firstname = $this->GetValue($values, $config[ShibbolethConfig::FIRSTNAME]);
     $this->_lastname = $this->GetValue($values, $config[ShibbolethConfig::LASTNAME]);
     $this->_email = $this->GetValue($values, $config[ShibbolethConfig::EMAIL]);
     $this->_phone = $this->GetValue($values, $config[ShibbolethConfig::PHONE]);
 }
コード例 #2
0
 /**
  * Constructor.
  * Populates the object's members with given values.
  *
  * @param array $values A map of user attributes.
  * @param ShibbolethOptions $options The plugin configuration.
  */
 public function __construct(array $values, ShibbolethOptions $options)
 {
     $config = $options->GetShibbolethOptions();
     $this->_username = $this->GetValue($values, $config[ShibbolethConfig::USERNAME]);
     $this->_firstname = $this->GetValue($values, $config[ShibbolethConfig::FIRSTNAME]);
     $this->_lastname = $this->GetValue($values, $config[ShibbolethConfig::LASTNAME]);
     $this->_email = $this->GetValue($values, $config[ShibbolethConfig::EMAIL]);
     $this->_phone = $this->GetValue($values, $config[ShibbolethConfig::PHONE]);
     // username is email; if there are more emails, use the first one
     $pos = strpos($this->_username, ";");
     $tmp_user = $this->_username;
     if ($pos !== false) {
         $this->_username = current(explode(';', $tmp_user));
     }
 }