function spaces_dashboard_users in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_dashboard/spaces_dashboard.module \spaces_dashboard_users()
1 string reference to 'spaces_dashboard_users'
- spaces_dashboard_team in spaces_dashboard/
spaces_dashboard.module
File
- spaces_dashboard/
spaces_dashboard.module, line 196
Code
function spaces_dashboard_users() {
$form = array();
$form['groups'] = array(
'#title' => t('Group'),
'#type' => 'select',
'#options' => array(
'---',
) + og_all_groups_options(),
);
$form['actions'] = array(
'#title' => t('Actions'),
'#type' => 'select',
'#disabled' => true,
'#options' => array(
0 => '---',
t('Groups') => array(
'join' => t('Add to Group'),
'yank' => t('Remove from Group'),
),
t('Status') => array(
'active' => t('Make Active'),
'block' => t('Block Users'),
),
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
$team = spaces_og_get_users(true, false, true, 20);
foreach ($team as $account) {
$account = (object) $account;
$account = user_load($account);
$form['username'][$account->uid] = array(
'#type' => 'markup',
'#value' => theme('username', $account),
);
$form['email'][$account->uid] = array(
'#type' => 'markup',
'#value' => l($account->mail, 'mailto:' . $account->mail),
);
$form['#accounts'][$account->uid] = $account;
$users[$account->uid] = '';
}
$form['users'] = array(
'#type' => 'checkboxes',
'#options' => $users,
);
$form['pager'] = array(
'#value' => theme('pager', NULL, 20, 0),
);
$form['#theme'] = 'spaces_dashboard_users';
return $form;
}