Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Redirect to user page on front-end login?

Started by Sean 8 years ago · 0 replies · 973 views
8 years ago

Can I modify a Theme Markdown file to force a redirect upon login based on grav.user.username or the first group that appears in their accounts YAML file?

So, user littlepup (first group in account YAML is puppywrestle), is redirected to:
/projects/littlepup
via something like this:
/projects/{{ grav.user.username }}

Or even better, redirected upon login to:
/projects/puppywrestle

Thanks in advance!

last edited 12/13/18 by Sean

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 11 months ago
6 1200 11 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 964 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 844 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 766 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1181 2 years ago