2014-07-20, 10:13 PM
Need a SIMPLE generator which will randomly generate the name of a user who is in a specified usergroup.
A VERY SIMPLE menu or page in the Admin Control Panel where there could be a "generate" button, resulting in a random user from the specified group being selected/displayed. IF POSSIBLE, also create a log entry every time a name is generated listing which username was generated.
I did some investigation already and found this (here on mybb but the original poster didn't elaborate how to use this), which apparently works. I would LOVE this to be put into a very simple plugin for use.
The plugin would require settings where you can change the usergroups to include and the minPosts #.
-- on my forum we need to randomly select members who are included in our 'active' or 'leaders' group, so they can participate in random events on the site. It's just easier to have a generator on board than using an off-site generator and hoping that the number/name generated is an active user, etc.
A VERY SIMPLE menu or page in the Admin Control Panel where there could be a "generate" button, resulting in a random user from the specified group being selected/displayed. IF POSSIBLE, also create a log entry every time a name is generated listing which username was generated.
I did some investigation already and found this (here on mybb but the original poster didn't elaborate how to use this), which apparently works. I would LOVE this to be put into a very simple plugin for use.
The plugin would require settings where you can change the usergroups to include and the minPosts #.
//pick a random user from the group
$usergroupIn = '8';
$minPosts = '0';
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE usergroup = '$usergroupIn' AND postnum >=$minPosts ORDER BY rand() LIMIT 1");
$user = $db->fetch_array($query);
$username = build_profile_link($user['username'], $user['uid']);
-- on my forum we need to randomly select members who are included in our 'active' or 'leaders' group, so they can participate in random events on the site. It's just easier to have a generator on board than using an off-site generator and hoping that the number/name generated is an active user, etc.