mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
24
app/Events/UserCreated.php
Normal file
24
app/Events/UserCreated.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UserCreated
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user