MyBB Community Forums

Full Version: a/w approval - user gets logged in
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

i noticed in my final stage testing that when a new user registers they are automatically logged into the board (albeit with a guest status).

I have a mod in place that stops them logging in after that. So if they logout they cannot log back in until i approve.

I don't want them being logged in at all. Can i stop this from happening automatically when they register.

cheers,
apologies for bumping but this is the last thing i'd like to modify before i migrate from phpbb {i think :lol: }
They will be logged in but will only have the priviledges which you can set in the admin CP.

Just make it so the "Awaiting Activation" group cant, post, pm or read the forums and your pretty much set.
yea i know but i dont want then showing as online or as recent visitor..

the reason being that i don't want members to see any spammer usernames which can be offensive.

i have a mod that won't let them login until activated so all i need to do is to switch off (or remove the code) for the part that logs them in automatically after registering
If I understand you correctly, you don't want the user to be logged in right after they register. Remove this code from member.php
		if($mybb->settings['regtype'] != "randompass")
		{
			// Log them in
			my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);
		}
thank you dennis Smile

that's done it. I think that's me just about ready to migrate now.

cheers........
Glad to hear that it's working Smile