Browse Source

deleted avatars

fixed deleting avatars while user deleting
master
Piotr Dergun 9 years ago
parent
commit
79034dd314
3 changed files with 2 additions and 0 deletions
  1. BIN
      images/avatars/11.jpg
  2. BIN
      images/avatars/6.jpg
  3. +2
    -0
      inc/controllers/AdminController.class.php

BIN
images/avatars/11.jpg View File

Before After
Width: 120  |  Height: 120  |  Size: 2.6 KiB

BIN
images/avatars/6.jpg View File

Before After
Width: 120  |  Height: 120  |  Size: 2.6 KiB

+ 2
- 0
inc/controllers/AdminController.class.php View File

@ -227,6 +227,8 @@ class AdminController extends Controller
if (!isset($_POST['rejected']))
{
$this->getModel('UsersModel')->deleteUser($_GET['id']);
if ($user_info['avatar'] != null) //delete user's avatar
unlink('./'.$user_info['avatar']);
$this->getView('MainView')->forum_message('Profile deleted. Redirecting to users list...', 'index.php?mode=admin&submode=users');
$lockv = true;
}

Loading…
Cancel
Save