getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Set access to user_register page #235

Open RomainLWiz opened 4 years ago

RomainLWiz commented 4 years ago

Hello, I wish I could put access to a group on the user_register page. I found a solution :

{% if ((grav.user.authorize('site.csm')) and (uri.path == "/user_register")) or (uri.path == "/user_profile") %} {% extends "forms/default/form.html.twig" %} {% else %} {% do grav.redirect('/user_register') %} {% endif %}

The problem is that I am forced to redirect to a page that has real access. So after my connection I must write again the links. My goal is to remove this redirection or to redirect me directly to the right page after the connection.

Have a good day