Пример #1
0
 /**
  * Login LDAP user to Bitrix. If user exists in Bitrix, simple login. If
  * not, create before.
  *
  * @internal
  *
  * @param Capall_Ldaper_LdapUser $ldapUser
  *
  * @return int Bitrix's user identifier.
  */
 public function getBitrixUser($ldapUser)
 {
     if (!($bitrixUserIdentifier = $this->bitrixUserManager->getByLogin($ldapUser->getLogin()))) {
         $bitrixUserIdentifier = $this->bitrixUserManager->create($ldapUser->getLogin(), $ldapUser->getMail());
     }
     return $bitrixUserIdentifier;
 }