phpFreeChat - Web2.0 AJAX chat server - Forum

phpFreechat related discussions.

You are not logged in.

Announcement

Please make sure to read the following thread BEFORE posting for support: http://www.phpfreechat.net/forum/viewtopic.php?id=4021

#1 2010-07-27 08:04:24

Kraven
New member

Permanent nickname and password login

Is there a way to permanently store a user name and password at login?
I would like users to be able to change their nick to any unused one while using the chat, so they can be anon, but I would also like to register user names with a password, so users are unable to pose as someone else.... for obvious reasons.

If anyone can point me in the right direction, even to other scripts that I could incorporate with PFC that would accomplish this.. it'd be much appreciated.

Thanks,
Kraven

Offline

 

#2 2010-07-29 19:52:03

todhend
Support Team

Re: Permanent nickname and password login

I built my own, try it here its not real easy for the beginner, it just uses a flat file to hold the user name and is encrypted


http://chat.tdah.us

Last edited by todhend (2010-07-29 19:54:09)


http://nflpick.net    free football picks
http://tdah.us   free webmail script

Offline

 

#3 2010-07-30 08:50:09

Kraven
New member

Re: Permanent nickname and password login

Thanks todhend, that's pretty close to what I'm looking to do.
I haven't a clue as to how to tie the form to the chat.
If I saw an example of the code, and the files I would need to create, it would help.
I've been looking through the pfc files for the default nick registration form, without success.
I figure if I can get a look at that, it might be a start to understanding what I need to do.
If you could point me to those files, it'll save me a lot of time, and would be much appreciated.

You've done a nice job with your alterations.

Thanks again,

Kraven

Offline

 

#4 2010-08-11 22:02:41

todhend
Support Team

Re: Permanent nickname and password login

this is a very basic explanation

if your familiar with sessions, any login script with sessions will work to replace the nick parameter
so you would include the login.php on the chat index page at the top then add whatever the login script uses as the user session to the chat index like so     

require("./login.php"); //holds the user session

my login script is pretty intensive so the user login session is ($_SESSION['ls_user']);

now add that to here in the chat index

$params["nick"] = $_SESSION['ls_user'];  // setup the initial nickname


so what happens is when you reach the chat index the login script pulls you to its page, after you log in it creates the login session redirects you back to the index and the chat converts that to its user name in the chat

Last edited by todhend (2010-08-11 22:03:53)


http://nflpick.net    free football picks
http://tdah.us   free webmail script

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB

©2006-2009 phpFreeChat