Topic: Php user class mail activation (Read 1342 times)
Bill Cosby is my Father
Posts: 4
24 credits Members referred : 0
« on: Oct 12, 2007, 08:14:55 PM »
Hi there!
I was just searching for this. Amazing it was just created a few days ago. I tested it and looks great. Now I need to integrate it with what I need. The problem is that I don't know much PHP. I think I need some help...
Maybe I should integrate the file access.class.php in one of my site files, so I won't need to create 2 database connections. Or, create a new file, with only the database connection, invoked by both the existing site and the access.class.php.
I also need the code to automatically send the activation email with an activation link to the user after registration, I don't have knowledge to do it myself.
Another thing, I could integrate example1.php and example2.php in one of my site files too, for the login and registration. But I noticed a problem in example1.php. If I choose the "remember me" option, the logout option will not work. Maybe some changes should be made to reset the login status and the "remember me" status, also on the cookie, in order to successfully logout. I don't know how to do it myself.
Can you give some opinion about all this? And please help me with the activation mail and the logout thing modifications.
Thank you!
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6349
38918 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Oct 13, 2007, 12:59:41 AM »
Nick I removed the remember me option from my script too (because of the same problem)
actually it's not a problem until different people using the same PC
Bill Cosby is my Father
Posts: 4
24 credits Members referred : 0
« Reply #4 on: Nov 07, 2007, 05:01:20 PM »
Hi there!
Thank you for the new stuff.
I had some trouble and found a workaround. If you use the function randomPass on access.class.php (called on example3.php) and if your PHP server version is below 5 (my case), you will have troubles with the use of the PHP function str_split(). I found in the PHP functions website some ways to do the same with earlier PHP versions.
I replaced
Code:
$ch = str_split($chrs);
with
Code:
$ch = split("-l-", chunk_split($chrs, 1, '-l-'));
and it seems to work alright.
By the way, Nikolas, if you can tell if there are any other functions that will only work in PHP 5, please point it out.
All the rest looks fine. Keep up the good work! Thank you!
« Last Edit: Nov 07, 2007, 05:20:21 PM by ThaSniper »
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8116
41653 credits Members referred : 3
« Reply #5 on: Nov 07, 2007, 10:56:50 PM »
That's strange. I use php 4 too for development and the code worked fine.
That's strange. I use php 4 too for development and the code worked fine.
What is the exact version you are using?
Hi there!
My site uses PHP v4.4.4 In PHP site, on that function page, the users comments state the troubles using it on older versions, and many posted workarounds, I used that one posted.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7225