protected function handleLdapUserWasAuthenticated(User $user, AdldapUser $adldapUser)
    {
        if ($adldapUser->inGroup('Help Desk')) {
            $admin = Role::admin();

            if ($admin instanceof Role) {
                $user->attachRole($admin->getKey());
            }
        }
    }
protected function handleLdapUserWasAuthenticated(User $user, AdldapUser $adldapUser)
    {
        if ($adldapUser->inGroup('Help Desk')) {
            $admin = Role::admin();

            if ($admin instanceof Role) {
                $user->attachRole($admin->getKey());
            }
        }
    }
protected function handleLdapUserWasAuthenticated ( User $ user , AdldapUser $ adldapUser ) { if ( $ adldapUser -> inGroup ( 'Help Desk' ) ) { $ admin = Role :: admin ( ) ; if ( $ admin instanceof Role ) { $ user -> attachRole ( $ admin -> getKey ( ) ) ; } } }
Attaches roles depending on the users active directory group.

@param User       $user
@param AdldapUser $adldapUser
Attaches roles depending on the users active directory group .