@@ 24-32 (lines=9) @@ | ||
21 | $name = $user->name; |
|
22 | $username = $user->username; |
|
23 | ||
24 | if (($user instanceof ElggUser) && ($user->canEdit())) { |
|
25 | if ($user->delete()) { |
|
26 | system_message(elgg_echo('admin:user:delete:yes', array($name))); |
|
27 | } else { |
|
28 | register_error(elgg_echo('admin:user:delete:no')); |
|
29 | } |
|
30 | } else { |
|
31 | register_error(elgg_echo('admin:user:delete:no')); |
|
32 | } |
|
33 | ||
34 | // forward to user administration if on a user's page as it no longer exists |
|
35 | $forward = REFERER; |
@@ 25-35 (lines=11) @@ | ||
22 | $username = $user->username; |
|
23 | $dbprefix = elgg_get_config("dbprefix"); |
|
24 | ||
25 | if (($user instanceof ElggUser) && ($user->canEdit())) { |
|
26 | $result = ModPleio\Helpers::removeUser($user); |
|
27 | ||
28 | if ($result) { |
|
29 | system_message(elgg_echo('admin:user:delete:yes', array($name))); |
|
30 | } else { |
|
31 | register_error(elgg_echo('admin:user:delete:no')); |
|
32 | } |
|
33 | } else { |
|
34 | register_error(elgg_echo('admin:user:delete:no')); |
|
35 | } |
|
36 | ||
37 | // forward to user administration if on a user's page as it no longer exists |
|
38 | $forward = REFERER; |