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

"Private Area" not working with session initialization disabled

Started by Robin Kählert 7 years ago · 1 replies · 571 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 jean-louis67, 3 days ago
2 81 2 days ago
General · by Andy Miller, 7 days ago
0 146 7 days ago
General · by Veehem, 1 week ago
0 145 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago