public function getCommonName(LDAPResult $lr) { return $lr->getCommonName(); }
/** * Create user account based on LDAPResult info. * * @param LDAPResult $lr * @return PFUser */ function createAccountFromLdap(LDAPResult $lr) { $user = $this->createAccount($lr->getEdUid(), $lr->getLogin(), $lr->getCommonName(), $lr->getEmail()); return $user; }
public function testMessage(LDAPResult $compare) { return "Expected {$this->expected}, recieved: {$compare->getCommonName()}"; }
/** * Do all the synchronization between an ldap result and a Codendi user. * * This method returns if it modified the user or not. This is usefull during * batch process in order to limit computing. * * @param User $user Codendi user * @param LDAPResult $lr Ldap result * * @return Boolean True if the method modified the user object */ public function sync(User $user, LDAPResult $lr) { $modified = false; if ($lr->getCommonName() !== null && $user->getRealName() != substr($lr->getCommonName(), 0, 32)) { $user->setRealName($lr->getCommonName()); $modified = true; } if ($lr->getEmail() !== null && $user->getEmail() != $lr->getEmail()) { $user->setEmail($lr->getEmail()); $modified = true; } return $modified; }