I was busy implementing this chat in my website. But after searching through the whole code and documentation I could not find a way to add password supported admin roles like in V1. (see: http://www.phpfreechat.net/admin )
Is it possible to do this in V2? Or is it to be implemented?
I have added the hook:
- Code: Select all
$GLOBALS['pfc_hooks']['pfc.isop'][5] = function ($app, $req, $res) {
return function ($login, $channel, $uid, $cid) use ($app, $req, $res) {
if ($login == 'Admin1' && $channel == "xxx" || $login == 'Admin2' && $channel == "xxx") {
return true;
} else {
return false;
}
};
};
But in this way everyone who just typed in Admin1 as username could log in as administrator, which is not safe.