Пример #1
0
 public function delete_user_image()
 {
     // Get the application object.
     $app = JFactory::getApplication();
     $user_id = JFactory::getUser()->get('id');
     /*$image_file = ideary::getUserImageName($user_id);
       $dir1 = "media/plg_user_profilepicture/images/50/".$image_file;
       $dir2 = "media/plg_user_profilepicture/images/200/".$image_file;
       $dir3 = "media/plg_user_profilepicture/images/original/".$image_file;*/
     $success = ideary::deleteUserImg($user_id);
     if ($success) {
         /*unlink($dir1);
           unlink($dir2);
           unlink($dir3);*/
         $dir = "templates/beez_20/images/user_profile/" . $user_id;
         Ideary::rrmdir($dir);
     }
     echo json_encode(array('success' => $success));
     $app->close();
 }