mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 05:43:45 +02:00
Add initial basic API changes
New route is `/api/me`
This commit is contained in:
@@ -162,7 +162,8 @@ class UserRepository
|
||||
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
|
||||
}
|
||||
|
||||
if(Auth::user()->id === $id) {
|
||||
// @TODO: this should probably be checked outside of this method because we won't always have Auth::user()
|
||||
if(!is_null(Auth::user()) && Auth::user()->id === $id) {
|
||||
throw new DisplayException('Cannot delete your own account.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user