Jump to content
dowmedia

Auto login in third party calendar

Recommended Posts

Hello,

In my web app I am needed an event calender separate for each registered user of the site. I used Luxicul calender.

Every thing is working fine except the auto sign in into calendar when user sign in into site.

I have installed the calender in site folder. and then as per there documentation.

<?php $session->lcUser = $caluser; ?> //$caluser is the email of user
<iframe id="lcmini" src="<?php echo $config->urls->site ;?>/luxcal/lcmini.php"></iframe>

I have write this code users.php template(Into template folder ).In above code I have put user->email in to session variable. thats all I got in there documentation.After debugging I found that  my session variable is not passing into the page of Iframe. so it is not sign in automatically .

Any help is much appreciated.

Thanks In advance

Syed Furquan

Edited by dowmedia

Share this post


Link to post
Share on other sites

Hello dowmedia,

have you enabled access to php files other than template files in your .htaccess?

You can simply enable this by commenting this line in the .htaccess out:

# Block access to any PHP or markup files in /site/templates/
RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ [OR]

This line could block the lcmini.php script.

Share this post


Link to post
Share on other sites

@AndZyk

I don't think that's a good idea, at least not the first solution I would go for. There's a very good reason PW blocks execution of 'foreign' .php files in that folder. I don't know about the lcmini.php script but I would first consider the following:

  • Convert it to a template file
  • Use an include from within a template file
Edited by kongondo
  • Like 4

Share this post


Link to post
Share on other sites

You are absolutely right, kongondo.

My question was meant as a test to figure out, if the lcmini.php script is blocked by the .htaccess file. But your solutions are more secure.  ;)

  • Like 1

Share this post


Link to post
Share on other sites

Sorry For delay in response(I have set notify on this topic. Any one let me know how processwire will notify me,on email??).

Although I have made new calender now. But I will be very happy if this problem get solved.

Icmini.php file is included in every template to show up mini calender.on clicking that calender a full event candler shows up in new page.By default it should automatically login(They call it Single sign on(SSO).)

So I am sure every file of luxical plugin in project is accessible by processwire(I have included processwire index.php in plugin to use api's).

problem is in some where sessions of luxical and processwire.

Any more debugging Idea is much appreciated.  

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Anton
      Hi there,
      I'm working with Processwire 3. Before summer I had issues to load to my backend. I finally managed to connect thanks to this : 
      $admin = wire('users')->get('admin');
      $admin->setOutputFormatting(false);
      $admin->set('pass', 'yo12345ZZ')
      $admin->save('pass');
      But later, the problem evolved: when I logged in to the site, the login page redirected me to the home. I didn't find any information about it on the web.
      But recently, the redirection has changed, now it is the login page that reloads when you connect. 
      I don't know where to start to fix this. It looks like sorcery.
      Thank you for all the help you can give me.
       
    • By angelo, italy
      Hi guys,
      I've always used WP but I want to swtich to PW. I'm not sure ....
      I'd like to know if it's possible to create a website for an online photo contest.
      The participants of the competition could create their own account, in which they upload their photos. The photos uploaded remain visible only to themselves and the judges.
      From their account they can make the "entrance fee" payment.
      The judges of the competition can create their own account... entering they see the photos of the participants and vote photos
      At the main page I imagine the title of the competition, a button to read the regulation, and a button to register.
      The website should be in Italian and English.
      Thank you!!
       
       
    • By Peter Knight
      I have a demo site which I moved to a new VPS for client testing
      We noticed that leaving a page open and then revisiting the site can result in a 25 second(ish) to load time and will then throw a 500 Error.
      The hosting guys had a look and confirmed that the server is fine but the issue could be related to authentication or sessions.
      We are running Page Protector and ProCache so I wondered if there were any known bugs here and any recommended actions.
      My actual PW log doesn't show anything but the server log has plenty of these
       
      2018-12-06 08:14:00 Error xxx.141.1x.101 500 POST /who-we-are/ HTTP/1.0     1.58 K Apache access 2018-12-06 08:14:45 Warning xxx.141.1x.131   mod_fcgid: read data timeout in 45 seconds, referer: http://demo.abc.not/who-we-are/       Apache error 2018-12-06 08:14:45 Error xxx.141.1x.131   End of script output before headers: index.php, referer: http://demo.abc.not/who-we-are/       Apache error 2018-12-06 09:03:18 Error xxx.141.1x.131   2614#0: *667 recv() failed (104: Connection reset by peer) while reading response header from upstream       nginx error Thanks
      P
    • By Marcel
      Hey all,
      I want to customize the mywebsite/processwire/profile page. It's almost all good but I want to get rid of the sections 'Admin Theme' and 'Language' so that the user can just set a new password. (see image)
      Do I have to modify the admin template or how can I do that? Because when I go tree>Admin>Profile there are no fields to add or remove.
      Or where can I find the php file?
      I would appreciate your help.

    • By ridgedale
      Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile.
      I'm trying to automatically redirect a logged-in user to a custom profile page using $session->redirect() and need to add $user->name to the redirect path.
      All my attempts appear to have failed:
      $session->redirect('/user-profile/')->name; $session->redirect('/user-profile/')->$user->name; $session->redirect('/user-profile/' . get($user->name . '/')); $session->redirect('/user-profile/' & get($user->name)); Can anyone point out where I am going wrong?
×
×
  • Create New...