Skip to content

Commit

Permalink
Fixed a bug where the edit user page could give a Twig error when vie…
Browse files Browse the repository at this point in the history
…wing a locked user account under certain circumstances.
  • Loading branch information
angrybrad committed Jun 29, 2017
1 parent 4afc79a commit a642094
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Craft CMS Changelog
### Fixed
- Fixed a bug where emails that had inner-word underscores would get converted to `<em>` tags if a HTML body was not provided in the email.
- Fixed a bug where the author of a draft could not delete their own draft if they did not have “Publish Live Changes” permissions.
- Fixed a bug where the edit user page could give a Twig error when viewing a locked user account under certain circumstances.

## 2.6.2985 - 2017-06-27

Expand Down
4 changes: 2 additions & 2 deletions src/templates/users/_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ <h5 class="heading">{{ "Account Status"|t }}</h5>
</div>
</div>

{% if account.status == 'locked' and craft.config.cooldownDuration %}
{% if account.status == 'locked' and craft.config.cooldownDuration and account.remainingCooldownTime %}
<div class="data">
<h5 class="heading">{{ "Cooldown Time Remaining"|t }}</h5>
<p class="value">{{ account.remainingCooldownTime.humanDuration }}</p>
<p class="value">{{ account.remainingCooldownTime.humanDuration() }}</p>
</div>
{% endif %}

Expand Down

0 comments on commit a642094

Please sign in to comment.