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

Commit eab845f

Browse files
committed
Added readme for new import users command
1 parent 47ba260 commit eab845f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

readme.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ It includes:
3333
* [Login Limitation Filter](#login-limitation-filter)
3434
* [Multiple Connections](#multiple-authentication-connections)
3535
* [Password Synchronization](#password-synchronization)
36+
* [Importing Users](#importing-users)
3637

3738
## Installation
3839

@@ -538,3 +539,31 @@ This feature is enabled by default.
538539
```php
539540
'password_sync' => env('ADLDAP_PASSWORD_SYNC', true),
540541
```
542+
543+
#### Importing Users
544+
545+
> **Note**: This feature was introduced in `v2.0.13`.
546+
547+
You can now import all users manually by running the artisan command:
548+
549+
```cmd
550+
php artisan adldap:import
551+
```
552+
553+
The command requires that you have the Adldap auth driver setup and configured before running.
554+
555+
When users are imported, they are given a random 16 character hashed password to ensure they are secure upon import.
556+
557+
After running the import, you will receive information of how many users were imported:
558+
559+
```cmd
560+
Successfully imported 249 user(s).
561+
```
562+
563+
Tips:
564+
565+
- Users who already exist inside your database will be updated with your configured `sync_attributes`
566+
- Users are never deleted from the import command, you will need to clear users regularely through your model
567+
- Successfully imported (new) users are reported in your log files: `[2016-06-29 14:51:51] local.INFO: Imported user johndoe`
568+
- Unsuccessful imported users are also reported in your log files, with the message of the exception:
569+
- `[2016-06-29 14:51:51] local.ERROR: Unable to import user janedoe. SQLSTATE[23000]: Integrity constraint violation: 1048`

0 commit comments

Comments
 (0)