lnms user:add command (#9830)

* Add lnms user:add command
Uses events to mark past notifications as read (even for non-manually added users)

* Filter out previous options from auto-completion

* use validation to check cli input

* Warn if using other auth

* abstract LnmsCommand

* Use setPassword helper for hashing instead of mutator

* Extract validation function
This commit is contained in:
Tony Murray
2019-02-15 09:00:07 -06:00
committed by GitHub
parent a41f1d9608
commit a4b79d3339
9 changed files with 345 additions and 22 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Providers;
use App\Listeners\MarkNotificationsRead;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
@@ -14,6 +15,7 @@ class EventServiceProvider extends ServiceProvider
protected $listen = [
\Illuminate\Auth\Events\Login::class => ['App\Listeners\AuthEventListener@login'],
\Illuminate\Auth\Events\Logout::class => ['App\Listeners\AuthEventListener@logout'],
\App\Events\UserCreated::class => [MarkNotificationsRead::class]
];
/**