Skip to content
Discussion options

You must be logged in to vote

Hi @nilskretschmer,

It seems like this requires some custom logic and is not directly possible using this package, right?

You're correct -- there is no built-in way to do this. You will have to implement this yourself.

Something like this may work for you after you've run a successful import of LDAP users:

use App\Models\User as EloquentUser;
use App\Models\Group as EloquentGroup;
use LdapRecord\Laravel\Import\Synchronizer;
use LdapRecord\Models\ActiveDirectory\Group as LdapGroup;

$config = [
    'sync_attributes' => [
        'name' => 'cn'
    ],
];

$synchronizer = new Synchronizer(EloquentGroup::class, $config);

foreach (LdapGroup::get() as $ldapGroup) {
    // Sync the group into…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nilskretschmer
Comment options

Answer selected by nilskretschmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants