本文整理汇总了PHP中Browse::getUserListArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Browse::getUserListArray方法的具体用法?PHP Browse::getUserListArray怎么用?PHP Browse::getUserListArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browse
的用法示例。
在下文中一共展示了Browse::getUserListArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: act_delete_user
public function act_delete_user()
{
//$this->set_event();
if (isset($_POST['no'])) {
set_redirect_header('admin', 'user_management');
return;
}
if (!isset($_POST['users'])) {
shnMessageQueue::addInformation(_t('PLEASE_SELECT_A_USER_TO_DELETE'));
set_redirect_header('admin', 'user_management');
exit;
}
$this->del_confirm = true;
if (isset($_POST['yes'])) {
if (isset($_POST['user'])) {
array_push($_POST['users'], $_POST['user']);
}
//if multiplt users are selected
if (is_array($_POST['users'])) {
foreach ($_POST['users'] as $user) {
if ($user == 'admin') {
shnMessageQueue::addInformation(_t('YOU_CANNOT_DELETE_THE_ADMINISTRATOR_ACCOUNT_'));
continue;
}
if ($user == $_SESSION['username']) {
shnMessageQueue::addInformation(_t('YOU_CANNOT_DELETE_YOURSELF_FROM_THE_LIST_OF_USERS_'));
continue;
}
if (key(acl_get_user_roles($user)) == 'admin' && $_SESSION['username'] != 'admin') {
shnMessageQueue::addInformation(_t('YOU_CANNOT_DELETE_OTHER_ADMIN_USERS_'));
continue;
}
$u = new User();
$up = new UserProfile();
$up->Delete('username', $user);
$u->Delete('username', $user);
acl_delete_user($user);
}
}
set_redirect_header('admin', 'user_management');
return;
}
//if there are multiple evets show table
$this->users = Browse::getUserListArray($_POST['users']);
}