Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

"Private Area" not working with session initialization disabled

Started by Robin Kählert 7 years ago · 1 replies · 802 views
7 years ago

Hi there, i want to make use of the feature described here: https://learn.getgrav.org/16/cookbook/general-recipes#create-a-private-area

So make a page only accessible if the user is logged in. Basically it works fine but not with our specific config, because we disabled the system.session.initialize.

In that case, access to the page always shows the login mask even if changing this config after login.

Does anyone know if this behaviour is intended and if not how we may could workaround this?

Thanks a lot.

7 years ago

@sque, I presume it is because when system.session.initialize is set to false, Grav won't set a cookie for the user.

According the comments in /system/config/system.yaml' for the setting system.session.initialize:

initialize: true # Initialize session from Grav (if false, plugin needs to start the session)

However, I haven't found in the readme of the plugin any reference to the initialization of a session.

You could create a ticket at the repo and ask the devs, or try Discord for a faster response. (Please do share any solution here at the forum)

Just curious: Why did you switch the initialization to false?

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago