Ticket #544 (closed feature: invalid)

Opened 8 months ago

Last modified 5 months ago

Simplifying maintaining users

Reported by: Waldschwein Assigned to: ryan
Priority: normal Milestone: 2.7.x
Component: admin Version: 2.6.5
Keywords: Cc:

Description

Hello!

According to this snippet: http://forum.websitebaker.org/index.php/topic,6662.0.html

It just extends the user dropdown list with the group a user is in. This is simplifying user and group maintaining with many users.

In /admin/users/index.php

Line 36-42 replace:

// Get existing value from database
$database = new database();
$query = "SELECT user_id, username, display_name, ".TABLE_PREFIX."groups.name AS group_name FROM ".TABLE_PREFIX."users, ".TABLE_PREFIX."groups WHERE (user_id != '1') AND (".TABLE_PREFIX."users.group_id = ".TABLE_PREFIX."groups.group_id) ORDER BY username";
$results = $database->query($query);
if($database->is_error()) {
	$admin->print_error($database->get_error(), 'index.php');
}

Line 51-56 replace:

// Loop through users
	while($user = $results->fetchRow()) {
		$template->set_var('VALUE', $user['user_id']);
		$template->set_var('NAME', $user['display_name'].' ('.$user['username'].')');
		$template->parse('list', 'list_block', true);
	}

Regards Michael

Change History

03/26/08 21:58:32 changed by Ruebenwurzel

  • status changed from new to closed.
  • resolution set to invalid.

not reasonable when using multiple groups available with WB 2.7