|
@@ -12,6 +12,8 @@ use App\Models\NodeHeartbeat;
|
|
use App\Models\Order;
|
|
use App\Models\Order;
|
|
use App\Models\Ticket;
|
|
use App\Models\Ticket;
|
|
use App\Models\User;
|
|
use App\Models\User;
|
|
|
|
+use App\Notifications\TicketCreated;
|
|
|
|
+use App\Notifications\TicketReplied;
|
|
use Cache;
|
|
use Cache;
|
|
use DB;
|
|
use DB;
|
|
use Exception;
|
|
use Exception;
|
|
@@ -137,6 +139,7 @@ class UserController extends Controller
|
|
{
|
|
{
|
|
$user = auth()->user();
|
|
$user = auth()->user();
|
|
if ($request->isMethod('POST')) {
|
|
if ($request->isMethod('POST')) {
|
|
|
|
+ $oldPassword = $user->password;
|
|
// 修改密码
|
|
// 修改密码
|
|
if ($request->has(['password', 'new_password'])) {
|
|
if ($request->has(['password', 'new_password'])) {
|
|
$data = $request->only(['password', 'new_password']);
|
|
$data = $request->only(['password', 'new_password']);
|
|
@@ -157,7 +160,8 @@ class UserController extends Controller
|
|
if (! $user->update(['password' => $data['new_password']])) {
|
|
if (! $user->update(['password' => $data['new_password']])) {
|
|
return Redirect::back()->withErrors(trans('common.update_action', ['action' => trans('common.failed')]));
|
|
return Redirect::back()->withErrors(trans('common.update_action', ['action' => trans('common.failed')]));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //auth()->logout();
|
|
|
|
+ auth()->logoutOtherDevices($oldPassword);
|
|
return Redirect::back()->with('successMsg', trans('common.update_action', ['action' => trans('common.success')]));
|
|
return Redirect::back()->with('successMsg', trans('common.update_action', ['action' => trans('common.success')]));
|
|
// 修改代理密码
|
|
// 修改代理密码
|
|
}
|
|
}
|