mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add getAuthenticator usage
Replace $app['authentication']->getUser() by $app->getAuthenticatedUser() replace twig app['authentication'].getUser() with corresponding method
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<h1 id="namePhr">{{home_title}}</h1>
|
||||
</div>
|
||||
|
||||
{% if not app['authentication'].isAuthenticated() %}
|
||||
{% if not app.getAuthenticator().isAuthenticated() %}
|
||||
<div id="content-box" class="span6 offset3">
|
||||
<form id="login-form" class="form-vertical" method="post">
|
||||
{% for key,value in auth.getParams %}
|
||||
@@ -54,8 +54,8 @@
|
||||
</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if app['authentication'].getUser() is not none %}
|
||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||
{% if app.getAuthenticatedUser() is not none %}
|
||||
{% set username = '<b>' ~ app.getAuthenticatedUser().getDisplayName() ~ '</b>' %}
|
||||
<div id="hello-box" class="span6 offset3">
|
||||
<p class="login_hello">
|
||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||
|
@@ -37,8 +37,8 @@
|
||||
<h1 id="namePhr">{{ app['conf'].get(['registry', 'general', 'title']) }}</h1>
|
||||
</div>
|
||||
|
||||
{% if app['authentication'].getUser() is not none %}
|
||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||
{% if app.getAuthenticatedUser() is not none %}
|
||||
{% set username = '<b>' ~ app.getAuthenticatedUser().getDisplayName() ~ '</b>' %}
|
||||
<div id="hello-box" class="span6 offset3">
|
||||
<p class="login_hello">
|
||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||
|
Reference in New Issue
Block a user