コード例 #1
0
ファイル: user.php プロジェクト: Speennaker/cometogether
 public function avatar_delete()
 {
     $this->auth();
     try {
         if ($this->model->delete_photo($this->user_id, $this->model->avatar)) {
             $this->response(true, 200);
         } else {
             $this->response(sprintf(lang('not_found'), ucfirst(lang('avatar'))), 404);
         }
     } catch (Exception $e) {
         $this->response($e->getMessage(), $e->getCode());
     }
 }