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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

"Private Area" not working with session initialization disabled

Started by Robin Kählert 7 years ago · 1 replies · 474 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 Jerry Hunt, 4 days ago
2 80 10 hours ago
General · by pamtbaau, 15 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago