Elgg  Version 2.3
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 
14 if (!$user instanceof ElggUser) {
15  return;
16 }
17 
18 $default_access = $user->getPrivateSetting('elgg_default_access');
19 if ($default_access === null) {
20  $default_access = elgg_get_config('default_access');
21 }
22 
23 $title = elgg_echo('default_access:settings');
25  '#type' => 'access',
26  'name' => 'default_access',
27  'value' => $default_access,
28  '#label' => elgg_echo('default_access:label'),
29  ));
30 
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
$content
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1424
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:48
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:56
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250
if(!elgg_get_config('allow_user_default_access')) $user
if($default_access===null) $title
if(!$user instanceof ElggUser) $default_access