function theme_gauth_user_services_authenticate_list in Google Auth 7.2
Same name and namespace in other branches
- 7 gauth_user/gauth_user.pages.inc \theme_gauth_user_services_authenticate_list()
Returns HTML for the page containing the list of services accounts.
Parameters
array $variables: An associative array containing:
- accounts: An array of all the accounts returned by gauth_user_services_enabled().
1 theme call to theme_gauth_user_services_authenticate_list()
- gauth_user_services_authenticate in gauth_user/
gauth_user.pages.inc - Menu callback; Creates authenticate link for end users.
File
- gauth_user/
gauth_user.pages.inc, line 29 - User pages for Google Auth User Services.
Code
function theme_gauth_user_services_authenticate_list($variables) {
$accounts = $variables['accounts'];
$header = array(
t('Name'),
);
$rows = array();
foreach ($accounts as $account) {
$row = array();
$row[] = $account->name;
$me = module_exists('me') && arg(1) == 'me';
if ($GLOBALS['user']->uid == arg(1) || $me) {
$row[] = isset($account->is_authenticated) ? $account->is_authenticated ? l(t('Revoke'), 'user/' . arg(1) . '/gauth_user/revoke/' . $account->id) : l(t('Authenticate'), 'gauth/response_handler/' . $account->id) : l(t('Create and Authenticate'), 'user/' . arg(1) . '/gauth_user/add_authenticate/' . $account->id);
$row[] = isset($account->is_authenticated) ? l(t('Delete'), 'user/' . arg(1) . '/gauth_user/delete/' . $account->id) : '';
$header[] = array(
'data' => t('Operations'),
'colspan' => 2,
);
}
else {
$row[] = isset($account->is_authenticated) ? $account->is_authenticated ? 'Authenticated' : 'Un-Authenticated' : 'Not Created';
$header[] = t('Status');
}
$rows[] = $row;
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
));
}