X7 Chat Support Board
Welcome,
Guest
. Please
login
or
register
.
July 31, 2010, 07:24:04 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
X7 Chat Version 3.0.0 Alpha 2 is now available (http://x7chat.com/support_forum/index.php?topic=3198.msg11497#new).
13036
Posts in
3760
Topics by
66531
Members
Latest Member:
yurapro1982
X7 Chat Support Board
Version 1 Archive
[Version 1] Mod Support
Session Variables and log in persistence
« previous
next »
Pages:
[
1
]
Author
Topic: Session Variables and log in persistence (Read 3032 times)
Dcoach
Member
Offline
Posts: 8
Session Variables and log in persistence
«
on:
January 06, 2005, 09:38:50 PM »
I envision someone logging into my site, but not going to the chat room right away. Then when they open the chat, I'd like them to be logged in already. Also, if someone logs into the chat and then wants to go from the chat room to read another page on my site, without logging out, I'd like them be logged into my site. I left the chat room and then came back, and was still logged in, so it seems like this could work.
From what I've been reading, I think this has to do with session variables. If I'm on the right track, could someone provide some info on the x7 session variables I'd need to know about for log in persistence, and how to use and pass them?
A mod I thought might work would be to use the x7 log-in page as the only log-in page for my site, but send the user to one of my pages instead of the chat room. Then if they want to chat, I'd send them from my page to the chat room, or they could go around my site and then to the chat room.
Does this sound feasible?
Report to moderator
Logged
E-Oreo
Administrator
Member
Offline
Posts: 3710
Session Variables and log in persistence
«
Reply #1 on:
January 07, 2005, 06:06:11 AM »
X7 Chat stores the user's username in a cookie and the user's password in a cookie. As long as the path is set to "/" and your website is on the same domain name as your chat room then your site will be able to read the X7 Chat. For the purposes of cookies subdomains count as unique domains, a cookie from chat.yoursite.com is not readable on yoursite.com.
The defaults are
X2CHATU for username
X2CHATP for password
(note that it is X
2
not X7)
You could either set up your website to use the X7 Chat cookies and database, or you can set up X7 Chat to use your web sites cookies and database.
Report to moderator
Logged
Dcoach
Member
Offline
Posts: 8
Session Variables and log in persistence
«
Reply #2 on:
January 07, 2005, 06:33:36 PM »
OK, I think I get that. I'll use the x7 cookies.
But I'm still wondering about the login.
Can I assume that if the cookie has expired, or is not there, then they are not logged in? And the converse, that if the cookie is there, then they are logged in? (this may be obvious, but I'm really new to this game)
Thank-David
Report to moderator
Logged
E-Oreo
Administrator
Member
Offline
Posts: 3710
Session Variables and log in persistence
«
Reply #3 on:
January 10, 2005, 07:33:36 PM »
If the cookie expires then it will be deleted. If the cookie is not present it means they are not logged in. If a cookie is present it does not necessarily mean they have logged in, it just means username/password data is available for you to check. You should never assume that just because there is a cookie that they are logged in, faking a cookie is very easy. If you detect a cookie the next step is to check it to see if the username/password are correct, then if it is they are logged in.
Report to moderator
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
News
-----------------------------
=> X7 Chat News
-----------------------------
X7 Chat General
-----------------------------
=> Discussion & Help
=> Feature Requests
=> Bug Reports
=> FAQs
=> Gallery
-----------------------------
X7 Chat Development
-----------------------------
=> X7 Chat 3 Discussion & Help
=> X7 Chat 3 Feature Requests
=> X7 Chat 3 Bug Reports
-----------------------------
X7 Chat Mods
-----------------------------
=> Developer Support
=> Mod Support
=> Mod Requests
-----------------------------
Version 1 Archive
-----------------------------
=> [Version 1] Discussion
=> [Version 1] Help
=> [Version 1] Feature Request
=> [Version 1] Bug Reports
=> [Version 1] Chat Room Gallery
=> [Version 1] Mod Request
=> [Version 1] Mod Support
Loading...