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

Commit 7cc16a8

Browse files
committed
Always ensure the schemas objectGUID attribute is selected
- Closes #706
1 parent 1eb8549 commit 7cc16a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Resolvers/UserResolver.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ public function query() : Builder
133133
{
134134
$query = $this->getLdapAuthProvider()->search()->users();
135135

136+
// We will ensure our object GUID attribute is always selected
137+
// along will all attributes. Otherwise, if the object GUID
138+
// attribute is virtual, it may not be returned.
139+
$selects = array_unique(array_merge(['*', $query->getSchema()->objectGuid()], $query->getSelects()));
140+
141+
$query->select($selects);
142+
136143
$scopes = Config::get('ldap_auth.scopes', []);
137144

138145
if (is_array($scopes)) {

0 commit comments

Comments
 (0)