$wgAuth = new HttpAuthPlugin(); //After this line, control is not reachin the next line, not printin the next log.
error_log("JITEN TEST :WGAUTH object created, Value of wgAuth is :" . $wgAuth . "\n", 3, $logfile);
$wgHooks['UserLoadFromSession'][] = array($wgAuth,'autoAuthenticate');
error_log("JITEN TEST :Value of wgAuth is :" . $wgAuth . "\n", 3, $logfile);
在上面的例子中,$wgAuth = new HttpAuthPlugin();
之后的代码没有被执行。
答案 0 :(得分:1)
根据撰写自己AuthPlugin的文章,该课程称为AuthPlugin
而不是HttpAuthPlugin
。
所以你似乎应该使用代码:
$wgAuth = new AuthPlugin();
这堂课来自第三方吗?