Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Plugin: Login

Started by Muut Archive 9 years ago · 1 replies · 425 views
9 years ago

Can someone explain to me the first line of this code is doing and where is the location? It is from 'message.html.twig' login plugin.

TWIG
{% for message in grav.messages.fetch %}

full code

TWIG
{% for message in grav.messages.fetch %}
<div class="{{ message.scope|e }} alert">{{ message.message|raw }}</div>
{% endfor %}

Also, I think the login plugin script needs a tweak. When requesting for a reset in password, any valid email email address will show message

Instructions to reset your password have been sent via email
But it is false. With the message set, and you jump back and forth between the login and forgot password screen, that message still appears.

9 years ago

Messages is an object set on the Grav object, and then fetch is a method to get the messages from the object if they exist.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1333 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2938 9 years ago
Archive · by Muut Archive, 9 years ago
3 1111 9 years ago