Lampwrights Forum

Lampwrights Forum (http://www.lampwrights.com/index.php)
-   vBulletin Wordpress Bridge (http://www.lampwrights.com/forumdisplay.php?f=13)
-   -   Permissions from sedondary vB group (http://www.lampwrights.com/showthread.php?t=154)

legal 06-10-2011 03:28 PM

Permissions from sedondary vB group
 
Good day, Jeff!

Thanks for your bridge, I set up it successfully, but I can't understand mapping functionality: is it works for primary vb_group only, or roles maps for secondary groups too?

My example:
1) I have two user groups on vBulletin: 'admin' and 'user'. And i have two users: A (groups - 'admin' is primary, 'user' is secondary) ; B (groups - 'user' is primary, 'admin' is secondary)
2) On the vbbridge I mapped 'admin' for an 'administrator' role and 'user' - for a 'subscriber' role
3) Next, I discommented the parameter define('USE_ADMINCP_BRIDGE', true);

In the result, user A get all permissions by role 'administrator'.
But user B has only permissons by role 'sudsriber'.
Is it correct work of briedge? Is it possible to enable mapping roles for a secondary group too?

Thank you. Sorry for my bad english ;)

Jeff 06-10-2011 06:05 PM

It only works for primary groups, it does not take secondary groups into account.

legal 06-12-2011 03:27 PM

So sad...

Can you help me - how to make it take the secondary group?
While I had saw the source code, I found this mysql query:
Code:

$us = $vb->db->query("SELECT userid, username FROM " . TABLE_PREFIX . "user where usergroupid = $group[usergroupid] or FIND_IN_SET($group[usergroupid], membergroupids)");
It is mean that script checks the value in two fields - by primary and by secondary group too. I tried to understand another procedures, but it failed becouse I don't know PHP .:(

It will be fery useful, if the bridge will be able to take a secondary group in account

legal 06-17-2011 08:39 AM

So, I want try to do it myself.

Tell me please - where does the bridge saves a mapping data?
I set the mapping in Control Panel and it was saved somewhere. Now i try to get this schedule/massive into the PHP - haw can i do this?

Jeff 06-17-2011 08:42 AM

All of the data is saved to the options table in the wordpress database. Good luck! :)


All times are GMT -4. The time now is 10:40 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.