Add getAuthenticator usage

Replace $app['authentication']->getUser() by $app->getAuthenticatedUser()
replace twig app['authentication'].getUser() with corresponding method
This commit is contained in:
Benoît Burnichon
2015-06-30 19:51:02 +02:00
parent 3804eb5408
commit 4880f2bf5a
113 changed files with 437 additions and 428 deletions

View File

@@ -55,16 +55,16 @@
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b></label>
<textarea id="feed_add_subtitle" style="max-width:500px" class="input-block-level" name="subtitle" rows="5">{{desc}}</textarea>
<label for="feed_add_author_name"><b>{{ 'publication : autheur' | trans }}</b></label>
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_name" id="feed_add_author_name" value="{{ app['authentication'].getUser().getDisplayName() }}" />
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_name" id="feed_add_author_name" value="{{ app.getAuthenticatedUser().getDisplayName() }}" />
<label for="feed_add_author_mail"><b>{{ 'publication : email autheur' | trans }}</b></label>
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_mail" id="feed_add_author_mail" value="{{ app['authentication'].getUser().getEmail() }}" />
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_mail" id="feed_add_author_mail" value="{{ app.getAuthenticatedUser().getEmail() }}" />
</div>
<div class="span6">
<div class="feeds">
<h1>{{ 'Fils disponibles' | trans }}</h1>
<div class="list">
{% for feed in feeds %}
{% if feed.isPublisher(app['authentication'].getUser()) %}
{% if feed.isPublisher(app.getAuthenticatedUser()) %}
<div class="feed {% if loop.index is odd%}odd{% endif %}">
<span>{{ feed.getTitle() }}</span>
{% if feed.isPublic() %}