Elgg  Version 6.1
default_access.php
Go to the documentation of this file.
1 <?php
8 if (!elgg_get_config('allow_user_default_access')) {
9  return;
10 }
11 
13 if (!$user instanceof \ElggUser) {
14  return;
15 }
16 
17 echo elgg_view_field([
18  '#type' => 'access',
19  '#label' => elgg_echo('default_access:label'),
20  'name' => 'default_access',
21  'value' => $user->elgg_default_access ?? elgg_get_config('default_access'),
22 ]);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
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_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:23
if(!elgg_get_config('allow_user_default_access')) $user
Provide a way of setting your default access.
$vars
Definition: theme.php:5