mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Can delete user account image
This commit is contained in:
parent
471ae35dd4
commit
caad9550b2
@ -238,6 +238,25 @@ class SettingsController {
|
||||
return array("success" => "The new account image has been successfully saved!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete current user account image
|
||||
*
|
||||
* @url POST /settings/delete_account_image
|
||||
*/
|
||||
public function delete_account_image(){
|
||||
|
||||
//Login required
|
||||
user_login_required();
|
||||
|
||||
//Try to delete user account image
|
||||
if(!components()->accountImage->delete(userID)){
|
||||
Rest_fatal_error(500, "Could not delete user account image!");
|
||||
}
|
||||
|
||||
//Success
|
||||
return array("success" => "The account image has been deleted!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn a GeneralSettings object into a valid API object
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user