Elgg  Version 6.1
delete.php
Go to the documentation of this file.
1 <?php
2 
4 
5 $user = get_user((int) elgg_extract('guid', $vars));
6 if (!$user instanceof \ElggUser) {
7  throw new EntityNotFoundException();
8 }
9 
11  'value' => elgg_echo('user:delete:description', [elgg_format_element('strong', [], $user->getDisplayName())]),
12 ]), ['class' => 'mbl']);
13 
14 $content .= elgg_view('core/settings/statistics', [
15  'entity' => $user,
16 ]);
17 
19  'action' => elgg_generate_action_url('admin/user/delete', [
20  'forward_url' => elgg_get_site_url(),
21  ], false),
22 ];
23 
25  'guid' => $user->guid,
26  'entity' => $user,
27 ];
28 
29 $content .= elgg_view_form('user/delete', $form_vars, $body_vars);
30 
31 echo elgg_view_page(elgg_echo('user:delete:title'), [
32  'content' => $content,
33 ]);
elgg_generate_action_url(string $action, array $query=[], bool $add_csrf_tokens=true)
Generate an action URL.
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1033
$form_vars
Definition: delete.php:18
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:898
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
Definition: views.php:542
elgg_view_page(string $title, string|array $body, string $page_shell= 'default', array $vars=[])
Assembles and outputs a full page.
Definition: views.php:235
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
Definition: users.php:16
$body_vars
Definition: delete.php:24
if($guid===elgg_get_logged_in_user_guid()) $user
Definition: delete.php:15
$vars
Definition: theme.php:5
Aggregate action for saving settings.
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
if(!$user instanceof\ElggUser) $content
Definition: delete.php:10