function drupagram_user_make_global in Drupagram 6
Same name and namespace in other branches
- 7 drupagram.pages.inc \drupagram_user_make_global()
1 string reference to 'drupagram_user_make_global'
- drupagram_menu in ./
drupagram.module - Implementation hook_menu().
File
- ./
drupagram.pages.inc, line 361 - Provieds drupagram forms.
Code
function drupagram_user_make_global($form, $form_state, $account, $drupagram_id) {
module_load_include('inc', 'drupagram');
$drupagram_account = drupagram_account_load($drupagram_id);
$form = array();
$form['uid'] = array(
'#type' => 'value',
'#value' => $account->uid,
);
$form['drupagram_id'] = array(
'#type' => 'value',
'#value' => $drupagram_id,
);
if ($drupagram_account->is_global) {
$text = t('Are you sure you want to remove %username from the global accounts?', array(
'%username' => $drupagram_account->username,
));
$description = t('This means other users will no longer be allowed to post using this account.');
}
else {
$text = t('Are you sure you want to allow other users to access the %username account?', array(
'%username' => $drupagram_account->username,
));
$description = t('This will allow other users to post using this account.');
}
return confirm_form($form, $text, 'user/' . $account->uid . '/edit/drupagram', $description);
}