From: Stéphane Jacob Date: Sun, 8 Aug 2010 16:35:37 +0000 (+0200) Subject: Removes warnings on login page. X-Git-Tag: xorg/1.0.1~280 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=37381e7c512b55bf6016419958c040317a56c10c;p=platal.git Removes warnings on login page. Signed-off-by: Stéphane Jacob --- diff --git a/include/security.inc.php b/include/security.inc.php index 47b38da..2f77f82 100644 --- a/include/security.inc.php +++ b/include/security.inc.php @@ -78,7 +78,10 @@ function check_email($email, $message) function check_account() { - return S::user()->watch; + if (S::user()) { + return S::user()->watch; + } + return false; } function check_redirect($red = null) diff --git a/plugins/insert.getUserName.php b/plugins/insert.getUserName.php index 769853b..7d69ee9 100644 --- a/plugins/insert.getUserName.php +++ b/plugins/insert.getUserName.php @@ -24,7 +24,7 @@ function smarty_insert_getUsername() global $globals; $id = Cookie::i('uid', -1); - $id = S::v($_SESSION['uid'], $id); + $id = S::v('uid', $id); if ($id < 0) { return ''; diff --git a/templates/core/password_prompt.tpl b/templates/core/password_prompt.tpl index 246f4b4..a4931d8 100644 --- a/templates/core/password_prompt.tpl +++ b/templates/core/password_prompt.tpl @@ -20,7 +20,7 @@ {* *} {**************************************************************************} -{if $referer || $platal->pl_self() neq 'login'} +{if t($referer) || $platal->pl_self() neq 'login'}

Accès restreint

@@ -52,7 +52,7 @@  @