You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/auth/setup.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,7 +336,13 @@ You can ignore the `windows` configuration array, unless you're planning on usin
336
336
337
337
### GUID Column
338
338
339
-
The GUID column is a new configuration option added in v6.0 that allows to set the database column that will store users Object GUID (Globally Unique Identifier). The addition of this database column allows you to make username changes in your LDAP directory, and have them properly synchronize in your Laravel application. This is usually the scenario when someone changes their marital status, or changes their name.
339
+
The GUID column is a new configuration option added in v6.0 that allows you to set the
340
+
database column that will store users Object GUID (Globally Unique Identifier).
341
+
342
+
The addition of this database column allows you to make username changes in your
343
+
LDAP directory, and have them properly synchronize in your Laravel application.
344
+
345
+
This is usually the scenario when someone changes their marital status, or changes their name.
340
346
341
347
If you're upgrading from a previous Adldap2-Laravel version, simply create a new migration and add the `nullable` column to your `users` database table.
342
348
@@ -363,7 +369,9 @@ Schema::create('users', function (Blueprint $table) {
363
369
});
364
370
```
365
371
366
-
If you have user records already inside your database with a `null``objectguid` value, then **it will be set automatically** if a user authenticates with the same username that is contained in your configured in your `username_column` option.
372
+
If you have user records already inside your database with a `null``objectguid` value, then
373
+
**it will be set automatically** if a user authenticates with the same username that
374
+
is contained in your configured in your `username_column` option.
367
375
368
376
For example, lets say we have a user in our database with the following information:
369
377
```
@@ -386,6 +394,15 @@ When a user successfully authenticates with the username of `[email protected]`, the
386
394
The next time this user authenticates, the `objectguid` will queried for **first**, then `email`.
387
395
This is done using a simple `or where` statement, so two queries are not executed for one login.
388
396
397
+
> **Note**: If the users identifier changes (their email / username) prior to their
398
+
> `objectguid` from being synchronized to your local database and they login to
399
+
> your application, a new user record will be created.
400
+
>
401
+
> This is due to not being able to locate a local user record with the users new username.
402
+
>
403
+
> It is recommended to keep your application in sync via scheduling the `adldap:import`
404
+
> command so that all users have a synchronized `objectguid`.
405
+
389
406
### Username Column
390
407
391
408
The `username_column` contains a value that should match the username column you have set up in your `users` database table.
0 commit comments