function ctools_access_get_loggedin_context in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/context.inc \ctools_access_get_loggedin_context()
Create a context for the logged in user.
5 calls to ctools_access_get_loggedin_context()
- ctools_access in includes/
context.inc - Determine if the current user has access via plugin.
- ctools_access_ajax_add in includes/
context-access-admin.inc - AJAX callback to add a new access test to the list.
- ctools_access_ajax_edit in includes/
context-access-admin.inc - AJAX callback to edit an access test in the list.
- ctools_access_summary in includes/
context.inc - Get a summary of an access plugin's settings.
- ctools_get_relevant_access_plugins in includes/
context.inc - Fetch a list of access plugins that are available for a given list of contexts.
File
- includes/
context.inc, line 1345 - Contains code related to the ctools system of 'context'.
Code
function ctools_access_get_loggedin_context() {
global $user;
$context = ctools_context_create('user', $user);
$context->identifier = t('Logged in user');
$context->keyword = 'viewer';
$context->id = 0;
return $context;
}