Esempio n. 1
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]);
 }
Esempio n. 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));
     }
 }