Jump to content

Help a PhP noob :P


Brudus

Recommended Posts

Okay, ive got my site up and running good, everything seems to be working fine, im having an issue with people being able to actually register to the site though. They recieve the confirmation email to click on a link to "finalize" but they get an error;

 

New User Activation Error

 

 

There is no user in the database with this information.

 

You can register a new user from here.

 

 

 

Now the link they are clicking on, does it have to point somewhere specific, and if so where to and how do i change it? Any ideas to get my juices flowing would be appreciated!

Link to comment
https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/
Share on other sites

It needs to point to something like

 

http://www.yoursite.com/validate.php?code=5616498416518846845

 

The code should be in the database and unique using some type of md5 hash with a random salt.

 

Once clicked it should update the database and set user status to "activated" or something.

 

Some code would be nice to help you, because there are too many unknowns.

Link to comment
https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211679
Share on other sites

Hrm, cant seem to find anything about validate.php, although im positive thats the problem because it makes perfect sense, i used phpnuke through my host, and ftp'd the php files to it, basically this is my first day messing with this stuff, and i've come a long way.. any idea where i could find validate.php, more specifically than in the database.

 

Thanks a ton frosty, at least i know the problem now!  ;D

Link to comment
https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211684
Share on other sites

Okay, found where op=activate, although, im not sure what im looking at as far as whats right and whats wrong, there is no where in the file where phpnuke.org is located..

 

not sure if this will do anything for ya, but i bolded where op=activate

 

} mt_srand ((double)microtime()*1000000); $maxran = 1000000; $check_num = mt_rand(0, $maxran); $check_num = md5($check_num); $time = time(); $finishlink = "$nukeurl/modules.php?name=$module_name&aemp;op=activate&username=$username&check_num=$check_num"; $new_password = md5($user_password); $username = check_html($username, nohtml); $user_email = check_html($user_email, nohtml); $result = $db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')"); if(!$result) { echo ""._ERROR."<BR>"; } else { $message = ""._WELCOMETO." $sitename!\n\n"._YOUUSEDEMAIL." ($user_email) "._TOREGISTER." $sitename.\n\n "._TOFINISHUSER."\n\n $finishlink\n\n "._FOLLOWINGMEM."\n\n"._UNICKNAME." $username\n"._UPASSWORD." $user_password"; $subject = ""._ACTIVATIONSUB.""; $from = "$adminmail"; mail($user_email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion()); title("$sitename: "._USERREGLOGIN.""); OpenTable(); echo "

<CENTER><B>"._ACCOUNTCREATED."</B><BR><BR>"; echo ""._YOUAREREGISTERED.""

Link to comment
https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211727
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.