diff --git a/app/tpl/head.html b/app/tpl/head.html index 7d1d79e4e3..803210b655 100644 --- a/app/tpl/head.html +++ b/app/tpl/head.html @@ -127,6 +127,7 @@ {% elseif App.Session.has('anon') %}
+ {{ 'Anonymous'|trans }} {{ 'Logout'|trans }}{{
{% endif %} diff --git a/app/tpl/show.html b/app/tpl/show.html index 763e246c98..819d10178c 100644 --- a/app/tpl/show.html +++ b/app/tpl/show.html @@ -99,7 +99,7 @@ {% if count == 0 and searchType != '' %} {{ "Sorry. I couldn't find anything :("|trans|msg('ko', false) }} -{% elseif count == 0 and searchType == '' %} +{% elseif count == 0 and searchType == '' and not App.Session.get('anon') %} {{ "Welcome to eLabFTW. Use the 'Create new' button to get started!"|trans|msg('ok', false) }} {% else %}

diff --git a/login.php b/login.php index 1a010e188d..d077d21417 100644 --- a/login.php +++ b/login.php @@ -23,7 +23,7 @@ try { // Check if already logged in - if ($Session->has('auth')) { + if ($Session->has('auth') || $Session->has('anon')) { $Response = new RedirectResponse("experiments.php"); $Response->send(); exit; diff --git a/register.php b/register.php index aacde24428..2b5e1a81ae 100644 --- a/register.php +++ b/register.php @@ -22,7 +22,7 @@ try { // Check if we're logged in - if ($Session->has('auth')) { + if ($Session->has('auth') || $Session->has('anon')) { throw new Exception(sprintf( _('Please %slogout%s before you register another account.'), "",