X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnet.php;h=a1bba73c4324ff23e6c576925a9d272db4366c5e;hb=66ac15905a2a66ccdee5725acbf967ff39c5656e;hp=d7726b37526ad9cdff9f975995a711f4d6e77cee;hpb=bdc1e8a02cb1cf18e41f4a8421f056c97932b7f3;p=platal.git diff --git a/modules/xnet.php b/modules/xnet.php index d7726b3..a1bba73 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -27,6 +27,7 @@ class XnetModule extends PLModule 'index' => $this->make_hook('index', AUTH_PUBLIC), 'exit' => $this->make_hook('exit', AUTH_PUBLIC), + 'login' => $this->make_hook('login', AUTH_COOKIE, 'groups'), 'admin' => $this->make_hook('admin', AUTH_PASSWD, 'admin'), 'groups' => $this->make_hook('groups', AUTH_PUBLIC), 'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC), @@ -40,6 +41,14 @@ class XnetModule extends PLModule ); } + function handler_login() + { + // We require different credentials for '/login/' ("groups" instead of "user"). + // We have to redirect the call to the actual CoreModule->handler_login. + $args = func_get_args(); + return call_user_func_array(array("CoreModule", "handler_login"), $args); + } + function handler_photo($page, $x = null) { if (!$x || !($profile = Profile::get($x))) {