Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Singel Signon MYSQL Authentication

 
Post new topic   Reply to topic     Forum Index -> Web site integration
View previous topic :: View next topic  
Author Message
maxhorizon



Joined: 28 Aug 2007
Posts: 7

PostPosted: Tue Aug 28, 2007 8:41 am    Post subject: Singel Signon MYSQL Authentication Reply with quote

I used the MySQL Module .. i can login to Thyme using my user table.. but i want to be able to login to thyme using my own login page .. can I do that ?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Tue Aug 28, 2007 12:36 pm    Post subject: Reply with quote

Hi,

It depends on how you are storing their user information. When they log into your site, how does it keep track of who has logged in?
Back to top
View user's profile Send private message Visit poster's website
maxhorizon



Joined: 28 Aug 2007
Posts: 7

PostPosted: Thu Aug 30, 2007 6:00 am    Post subject: Reply with quote

I have a session variable called $_SESSION['kt_login_id'] that I always validate to make sure it's alive and not empty.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Aug 30, 2007 12:18 pm    Post subject: Reply with quote

Hi,

Is that the numeric id or the userid?
Back to top
View user's profile Send private message Visit poster's website
maxhorizon



Joined: 28 Aug 2007
Posts: 7

PostPosted: Thu Aug 30, 2007 1:31 pm    Post subject: Reply with quote

$_SESSION['kt_login_id'] is numeric value while the user name text value is stored in $_SESSION['kt_login_user']
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Aug 30, 2007 2:19 pm    Post subject: Reply with quote

Hi,

You'll want to place this in your MySQL authentication module below line 83:

Code:

session_start();
if($_SESSION['kt_login_id']) {
   $_SESSION['uid'] = $_SESSION['kt_login_id'];
   define("_CAL_REUSE_SESSION_", 1);
}
Back to top
View user's profile Send private message Visit poster's website
maxhorizon



Joined: 28 Aug 2007
Posts: 7

PostPosted: Thu Aug 30, 2007 4:10 pm    Post subject: Reply with quote

Thanks for the fast reply
This works perfectly .. I think to logout the thyme system I need to make the $_SESSION['uid'] null in my own logout mechanism .. right?

Thanks again .. wonderful software
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Aug 30, 2007 4:29 pm    Post subject: Reply with quote

It really depends. Can you explain your site's logout mechanism a little please?
Back to top
View user's profile Send private message Visit poster's website
maxhorizon



Joined: 28 Aug 2007
Posts: 7

PostPosted: Thu Aug 30, 2007 4:34 pm    Post subject: Reply with quote

It's simple actually. I use the following logic to check the login status

if (!isset($_SESSION['kt_login_user'])) then {NOT_LOGGED} else {LOGGED}

So I basically make the variables $_SESSION['kt_login_user'] and $_SESSION['kt_login_id'] null at the logout to make sure I don't go through the LOGGED code block.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Aug 30, 2007 4:41 pm    Post subject: Reply with quote

Then yes, you could probably do something more simple actually:

Code:

session_start();
$_SESSION['uid'] = $_SESSION['kt_login_id'];
define("_CAL_REUSE_SESSION_", 1);
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Web site integration All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.