MyBB Community Forums
Perform query when administrator activation has been approved. - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Perform query when administrator activation has been approved. (/thread-31809.html)



Perform query when administrator activation has been approved. - Tim B. - 2008-05-26

I am a bit lost, could someone tell me where MYBB performs the query that adds changes the activated field to yes for a user when an administrator has approved them? (When it is set so an administrator has to approve it). I am trying to bridge mybb and wordpess users on my blog and i have been successful but i have made my blog private and i only want it to add the user to wordpress when they have been activated. I hope that makes sense and any help would be awesome Smile

Ps. I will post up by bridge when i am done (it pretty basic though).


RE: Perform query when administrator activation has been approved. - LeX- - 2008-05-26

It only changes the usergroup;

./admin/users.php
if($mybb->input['action'] == "activate")
{
...
$query = $db->query("UPDATE ".TABLE_PREFIX."users SET usergroup = '2' WHERE uid='".intval($mybb->input['uid'])."' AND usergroup = '5'");
...
}

If they need an approvement, their usergroup == 5 ; a simple select query with as where-clause usergroup=5


RE: Perform query when administrator activation has been approved. - Tim B. - 2008-05-26

Ok, thats fine. The other thing i am having trouble with is creating a mybb cookie. It would be great if you could give me an example of that code. Can i create one external to mybb (assuming i can access mybb's database) in wordpress? Or does it have to be done by mybb?
Thanks (I hope you understand this).