mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
#3611 igam notification
This commit is contained in:
parent
2267339c91
commit
de79acb2dc
@ -0,0 +1,9 @@
|
|||||||
|
<?php namespace Visiosoft\ProfileModule\Events;
|
||||||
|
|
||||||
|
class PasswordChanged
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,6 +5,7 @@ use Anomaly\UsersModule\User\User;
|
|||||||
use Anomaly\UsersModule\User\UserPassword;
|
use Anomaly\UsersModule\User\UserPassword;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Visiosoft\ProfileModule\Events\PasswordChanged;
|
||||||
|
|
||||||
class PasswordFormHandler
|
class PasswordFormHandler
|
||||||
{
|
{
|
||||||
@ -43,6 +44,9 @@ class PasswordFormHandler
|
|||||||
$user = User::query()->find(Auth::id());
|
$user = User::query()->find(Auth::id());
|
||||||
$user->setAttribute('password', $builder->getPostValue('new_password'));
|
$user->setAttribute('password', $builder->getPostValue('new_password'));
|
||||||
$user->save($user->toArray());
|
$user->save($user->toArray());
|
||||||
|
|
||||||
|
event(new PasswordChanged());
|
||||||
|
|
||||||
$messages->success(trans('visiosoft.module.profile::message.your_password_changed'));
|
$messages->success(trans('visiosoft.module.profile::message.your_password_changed'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user