mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-29 10:26:46 -04:00
Don't let the admin delete themselves, either. That would be bad.
This commit is contained in:
@@ -82,7 +82,7 @@ class Users_Controller extends REST_Controller {
|
||||
* @see REST_Controller::_delete($resource)
|
||||
*/
|
||||
public function _delete($user) {
|
||||
if (!user::active()->admin) {
|
||||
if (!user::active()->admin || $user->id == user::active()->id ) {
|
||||
access::forbidden();
|
||||
}
|
||||
// Prevent CSRF
|
||||
|
||||
Reference in New Issue
Block a user