Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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');
24 $content = elgg_view_input('access', array(
25  'name' => 'default_access',
26  'value' => $default_access,
27  'label' => elgg_echo('default_access:label'),
28  ));
29 
30 echo elgg_view_module('info', $title, $content);
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
$content
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_input($input_type, array $vars=array())
Renders a form field.
Definition: views.php:1332
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:1207
if(!elgg_get_config('allow_user_default_access')) $user
if($default_access===null) $title
if(!$user instanceof ElggUser) $default_access