mirror of
https://github.com/typemill/typemill.git
synced 2025-07-30 19:00:32 +02:00
v2.3.0 delete own user fix
This commit is contained in:
@@ -354,13 +354,14 @@ class ControllerApiSystemUsers extends Controller
|
||||
}
|
||||
|
||||
# if user deleted his own account
|
||||
if(isset($_SESSION['user']) && $_SESSION['user'] == $username)
|
||||
if($username == $request->getAttribute('c_username'))
|
||||
{
|
||||
Session::stopSession();
|
||||
}
|
||||
|
||||
$response->getBody()->write(json_encode([
|
||||
'message' => Translations::translate('User deleted.'),
|
||||
'logout' => true
|
||||
]));
|
||||
|
||||
return $response->withHeader('Content-Type', 'application/json');
|
||||
|
Reference in New Issue
Block a user