Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set access to user_register page #235

Open
RomainLWiz opened this issue Nov 28, 2019 · 0 comments
Open

Set access to user_register page #235

RomainLWiz opened this issue Nov 28, 2019 · 0 comments

Comments

@RomainLWiz
Copy link

RomainLWiz commented Nov 28, 2019

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

@RomainLWiz RomainLWiz changed the title Access to user_register page Set access to user_register page Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant