Home »
FUDforum »
How To »
API to programatically add moderators and group leaders ?
API to programatically add moderators and group leaders ? [message #35430] |
Wed, 10 January 2007 18:19 |
syl20
Messages: 7 Registered: January 2007
Karma:
|
Junior Member |
|
|
Hi,
I'm looking for an API or suggestions to add moderators and leaders via scripting.
I need to synchronize users and moderators from an external app.
Reading mysql logs when adding a moderator shows this :
DELETE FROM fud26_mod WHERE user_id=96;
INSERT INTO fud26_mod (forum_id, user_id) VALUES(3, 96);
UPDATE fud26_forum SET moderators=NULL;
UPDATE fud26_forum SET moderators='a:1:{i:96;s:32:\"display name\";}' WHERE id=3;
UPDATE fud26_users SET users_opt=users_opt & ~ 524288 WHERE users_opt>=524288 AND (users_opt & 524288) > 0;
UPDATE fud26_users SET users_opt=users_opt|524288 WHERE id IN(96) AND (users_opt & 1048576)=0;
It seems to be quite complicated. I'm wondering if there's a function to call to do that ?
Thanks,
Sylvain
|
|
|
Goto Forum:
Current Time: Mon Nov 25 04:08:47 GMT 2024
Total time taken to generate the page: 0.04128 seconds