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

Commit 3b2ae13

Browse files
committed
Check if a model instance was given
1 parent c2e7690 commit 3b2ae13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AdldapAuthUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function handleDiscoveredUserWithCredentials(User $user)
126126
*/
127127
protected function discoverAdldapFromModel($model)
128128
{
129-
if ($this->getBindUserToModel()) {
129+
if ($this->getBindUserToModel() && $model) {
130130
// If the developer wants to bind the Adldap User model
131131
// to the Laravel model, we'll query to find it.
132132
$attributes = $this->getUsernameAttribute();

0 commit comments

Comments
 (0)