Page 1 of 1

Custom login doesn't work with mod list from config.xml

Posted: 16 Jul 2011, 15:05
by Sarevok
Ok, maybe this is a well known fact, but I couldn't find it in documentation. To make things even worse, "Custom login integration" tutorial talks about setting moderators in config file, which is impossible (from my experience) when you use a custom login (seems like they are just ignored).

I really like config file defined mods feature. Is there any way I can access "moderator profile data" from custom login extension? On server side we have "addModerator" and "removeModerator" methods, but I don't see "getModerators" kind of method, that would enable me to compare logged user to moderator list, so I could call user.setAsModerator().

Am I missing something?

Posted: 18 Jul 2011, 00:58
by BigFIsh
You will need to use a different appraoch to identify moderator users. Some options: a) store 'is a moderator' flag in database or b) store a list in your zone extension.

Posted: 18 Jul 2011, 10:12
by Sarevok
Sure, I already did something similar, but it is just shame that we can't reuse such useful feature in custom login :)
It would make much more sense to me, if API automatically checks the moderator list inside "canLogin" method call.