diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index efcd24cdcd..fd9a11b168 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -686,6 +686,11 @@ class Application extends SilexApplication return false; } + /** + * Tells if guests are allowed + * + * @return boolean + */ public function isGuestAllowed() { $usrId = \User_Adapter::get_usr_id_from_login($this, 'invite'); @@ -697,7 +702,12 @@ class Application extends SilexApplication return count(\User_Adapter::getInstance($usrId, $this)->ACL()->get_granted_base()) > 0; } - public function hasLoginTermsOfUse() + /** + * Tells if application has terms of use + * + * @return noolean + */ + public function hasTermsOfUse() { return '' !== \databox_cgu::getHome($this); } diff --git a/templates/web/login/layout/base-layout.html.twig b/templates/web/login/layout/base-layout.html.twig index da02f24500..7fbd9f90e1 100644 --- a/templates/web/login/layout/base-layout.html.twig +++ b/templates/web/login/layout/base-layout.html.twig @@ -78,7 +78,7 @@
  • {% trans "Help" %}
  • - {% if app.hasLoginTermsOfUse() %} + {% if app.hasTermsOfUse() %}
  • {% block tou_link %} {% trans "Terms of use" %}