getMail() 공개 메소드

Returns the user's email address from LDAP
public getMail ( string $username ) : string
$username string Username
리턴 string
예제 #1
0
파일: AuthLdap.php 프로젝트: nosch/phpMyFAQ
 /**
  * Adds a new user account to the authentication table.
  *
  * Returns true on success, otherwise false.
  *
  * @param  string $login Loginname
  * @param  string $pass  Password
  * @return boolean
  */
 public function add($login, $pass)
 {
     $user = new PMF_User();
     $result = $user->createUser($login, null);
     // Update user information from LDAP
     $user->setUserData(array('display_name' => $this->ldap->getCompleteName($login), 'email' => $this->ldap->getMail($login)));
     return $result;
 }
예제 #2
0
파일: AuthLdap.php 프로젝트: atlcurling/tkt
 /**
  * Adds a new user account to the authentication table.
  * Returns true on success, otherwise false.
  *
  * @param  string $login Login name
  * @param  string $pass  Password
  *
  * @return boolean
  */
 public function add($login, $pass)
 {
     $user = new PMF_User();
     $user->setLoginMinLength(2);
     // LDAP user names can be very short!
     $result = $user->createUser($login, null);
     $user->setStatus('active');
     // Update user information from LDAP
     $user->setUserData(array('display_name' => $this->ldap->getCompleteName($login), 'email' => $this->ldap->getMail($login)));
     return $result;
 }
예제 #3
0
 /**
  * Adds a new user account to the authentication table.
  * Returns true on success, otherwise false.
  *
  * @param  string $login Login name
  * @param  string $pass  Password
  *
  * @return boolean
  */
 public function add($login, $pass)
 {
     $user = new PMF_User($this->_config);
     $result = $user->createUser($login, null);
     $this->ldap->connect($this->ldapServer[$this->activeServer]['ldap_server'], $this->ldapServer[$this->activeServer]['ldap_port'], $this->ldapServer[$this->activeServer]['ldap_base'], $this->ldapServer[$this->activeServer]['ldap_user'], $this->ldapServer[$this->activeServer]['ldap_password']);
     if ($this->ldap->error) {
         $this->errors[] = $this->ldap->error;
     }
     $user->setStatus('active');
     // Update user information from LDAP
     $user->setUserData(array('display_name' => $this->ldap->getCompleteName($login), 'email' => $this->ldap->getMail($login)));
     return $result;
 }