PMF_Ldap::getMail PHP Method

getMail() public method

Returns the user's email address from LDAP
public getMail ( string $username ) : string
$username string Username
return string
    public function getMail($username)
    {
        return $this->getLdapData($username, 'mail');
    }

Usage Example

示例#1
0
 /**
  * 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;
 }
All Usage Examples Of PMF_Ldap::getMail