Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 42fd09e

Browse files
committed
Don't count dirty, eloquent already does this
1 parent 5fb96bf commit 42fd09e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/AdldapAuthUserProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public function retrieveByCredentials(array $credentials)
5959
$username = $user->{$this->getLoginAttribute()};
6060

6161
if(is_array($username)) {
62+
// We'll make sure we retrieve the users first username
63+
// attribute if it's contained in an array.
6264
$username = Arr::get($username, 0);
6365
}
6466

@@ -149,8 +151,7 @@ protected function syncModelFromAdldap(User $user, Authenticatable $model)
149151
$model->{$modelField} = $adValue;
150152
}
151153

152-
// Only save models that contain changes.
153-
if($model instanceof Model && count($model->getDirty()) > 0) {
154+
if($model instanceof Model) {
154155
$model->save();
155156
}
156157

0 commit comments

Comments
 (0)