LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Add Login to Display.php
Posted:  01 Mar 2017 23:43
How hard would it be to add a login check to the display1.php? I would like for it to check that the user is logged in before displaying, and if not redirect them to log in.
Posted:  02 Mar 2017 20:53
That's not so easy. The displays are stand-alone scripts which use the functions of the calendar, but for the rest are independent.
So the first question would be: How can display2 know what user is visiting the site?
Suppose display2 would know that the visitor is a not logged in user, then redirecting him/her to the calendar's login page is not possible. The calendar's log in page goes with the flow of the calendar and is not a "stand-alone" script which can be combined with display2.
So I think it would be rather hard to do this.
Of course an experienced PHP programmer could create a sort of shell around display2, but it would be a bit of work.
Posted:  02 Mar 2017 22:33
I figured as much, I was hoping it would be a simple cookie check and redirect.. But maybe not.