Solved: 6 Years, 8 Months, 1 Week ago Group join requests
#1
Solved: 6 Years, 8 Months, 1 Week ago
We have several different groups that require join requests to be moderated. Since upgrading to 1.8, if someone applies to join any group, an email request goes to the leaders of all groups. There's no way to tell which group the person is asking to join, except that the leaders it doesn't apply to don't see anything when they come to approve the request. Any idea what's going on there? And how to fix it?
Reply
#2
Solved: 6 Years, 8 Months, 1 Week ago
It's a bug which will be fixed in 1.8.5. For now you can open usercp.php and change:
			foreach($groupleaders as $key => $groupleader)
			{
				foreach($groupleader as $leader)
				{
					$leader_user = get_user($leader['uid']);
					
					// Load language
					$lang->set_language($leader_user['language']);
					$lang->load("messages");
					
					$subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']);
					$message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader_user['username'], $mybb->user['username'], $usergroups[$leader['gid']]['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']);
					my_mail($leader_user['email'], $subject, $message);
				}
			}
to:
			foreach($groupleaders[$usergroup['gid']] as $leader)
			{
				// Load language
				$lang->set_language($leader['language']);
				$lang->load("messages");
					
				$subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']);
				$message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader['username'], $mybb->user['username'], $usergroup['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']);
				my_mail($leader['email'], $subject, $message);
			}
And:
	$query = $db->query("
		SELECT g.*, u.username, u.displaygroup, u.usergroup
		FROM ".TABLE_PREFIX."groupleaders g
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid)
		ORDER BY u.username ASC
	");
to:
	$query = $db->query("
		SELECT g.*, u.username, u.displaygroup, u.usergroup, u.email, u.language
		FROM ".TABLE_PREFIX."groupleaders g
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid)
		ORDER BY u.username ASC
	");
Reply
#3
Solved: 6 Years, 8 Months, 1 Week ago
Thank you!
Reply
#4
Solved: 6 Years, 8 Months, 1 Week ago
MyBB has groups ? How to use it ? Does it need a separate plugin ?
Reply
#5
Solved: 6 Years, 8 Months, 1 Week ago
ACP >> Users and Groups >> Groups, add a new group...

After creating the group you can find "Publicly Joinable Options" under its settings, you can set those options as required...
We can't help everyone, but everyone can help someone - Ronald Reagan
Did you know? Your question has already been answered. But you haven't searched it yet.
Don’t  Forget to “Mark as Solved” after the fix
Reply
#6
Solved: 6 Years, 8 Months, 1 Week ago
Thank you Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)