Skip to content

Commit

Permalink
Add method for overriding the built-in UserSynchronizer
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed May 10, 2021
1 parent bc49ba5 commit 0b439c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/LdapRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace LdapRecord\Laravel;

use LdapRecord\Laravel\Import\UserSynchronizer;

class LdapRecord
{
/**
Expand Down Expand Up @@ -54,4 +56,16 @@ public static function locateUsersUsing($class)
{
app()->bind(LdapUserRepository::class, $class);
}

/**
* Register a class that should be used for synchronizing LDAP users.
*
* @param string|\Closure $class
*
* @return void
*/
public static function synchronizeUsersUsing($class)
{
app()->bind(UserSynchronizer::class, $class);
}
}

0 comments on commit 0b439c5

Please sign in to comment.