Revision 1304
Added by Luisehahne over 15 years ago
| users.php | ||
|---|---|---|
| 40 | 40 |
exit(0); |
| 41 | 41 |
} |
| 42 | 42 |
|
| 43 |
if($_POST['action'] == 'modify') {
|
|
| 43 |
if($_POST['action'] == 'modify') |
|
| 44 |
{
|
|
| 44 | 45 |
// Print header |
| 45 | 46 |
$admin = new admin('Access', 'users_modify');
|
| 46 | 47 |
// Get existing values |
| ... | ... | |
| 71 | 72 |
} |
| 72 | 73 |
// Add groups to list |
| 73 | 74 |
$template->set_block('main_block', 'group_list_block', 'group_list');
|
| 74 |
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
|
|
| 75 |
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1' ORDER BY name");
|
|
| 75 | 76 |
if($results->numRows() > 0) {
|
| 76 | 77 |
$template->set_var('ID', '');
|
| 77 | 78 |
$template->set_var('NAME', $TEXT['PLEASE_SELECT'].'...');
|
| ... | ... | |
| 88 | 89 |
$template->parse('group_list', 'group_list_block', true);
|
| 89 | 90 |
} |
| 90 | 91 |
} |
| 92 |
|
|
| 91 | 93 |
// Only allow the user to add a user to the Administrators group if they belong to it |
| 92 |
if(in_array(1, $admin->get_groups_id())) {
|
|
| 94 |
if(in_array(1, $admin->get_groups_id())) |
|
| 95 |
{
|
|
| 93 | 96 |
$template->set_var('ID', '1');
|
| 94 | 97 |
$users_groups = $admin->get_groups_name(); |
| 95 | 98 |
$template->set_var('NAME', $users_groups[1]);
|
| 96 |
|
|
| 99 |
|
|
| 97 | 100 |
$in_group = FALSE; |
| 98 | 101 |
foreach($admin->get_groups_id() as $cur_gid){
|
| 99 | 102 |
if (in_array($cur_gid, explode(",", $user['groups_id']))) {
|
| ... | ... | |
| 115 | 118 |
$template->parse('group_list', 'group_list_block', true);
|
| 116 | 119 |
} |
| 117 | 120 |
} |
| 118 |
|
|
| 121 |
|
|
| 119 | 122 |
// Generate username field name |
| 120 | 123 |
$username_fieldname = 'username_'; |
| 121 | 124 |
$salt = "abchefghjkmnpqrstuvwxyz0123456789"; |
Also available in: Unified diff
Ticket #956 Useraccounts, now e-mail is required