13, October 2008

Php user class mail activation - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Php user class mail activation
« previous next »
Pages: [1] Print

Author Topic: Php user class mail activation  (Read 1346 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. Smiley
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: Male
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


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8120
41677 credits
Members referred : 3



« Reply #2 on: Oct 13, 2007, 01:10:30 AM »

I will check this out. ThaSniper I will write a tutorial these days on the activation subject.

In the meanwhile experiment with the class and let me know if you have any other questions Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8120
41677 credits
Members referred : 3



« Reply #3 on: Oct 29, 2007, 12:01:11 PM »

I've just released a new version that also has an example of email activation (example3.php)

Hope this is useful to you Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
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. Smiley

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: Male
Posts: 8120
41677 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.

What is the exact version you are using?

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Just another rainy day
*
Posts: 1
6 credits
Members referred : 0


« Reply #6 on: Nov 08, 2007, 10:33:26 PM »

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

Hello,

1) Thank you for you users management class.
2) in the logout function, you avec to replace
Code:
unset($_COOKIE[$this->remCookieName])
by
Code:
setcookie($this->remCookieName);//cfur

.regards
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8120
41677 credits
Members referred : 3



« Reply #7 on: Nov 08, 2007, 11:28:08 PM »

Hehe, you are right. I will fix this tomorrow as I am not in my pc right now.

Thanks for the heads up alsachris68, and welcome to webdigity Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8120
41677 credits
Members referred : 3



« Reply #8 on: Nov 09, 2007, 11:03:50 AM »

Bug fixed. You may download the new version now.

I've changed this line to :

setcookie($this->remCookieName''time()-3600);

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Bill Cosby is my Father
*
Posts: 4
24 credits
Members referred : 0


« Reply #9 on: Nov 30, 2007, 07:55:06 PM »

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
Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Php user class mail activation
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct 13, 2008, 08:40:29 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.944
Total Topics: 7.560
Total Members: 4.153
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Chalky566

28 Guests, 3 Users online :

16 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.