Brudus Posted March 20, 2007 Share Posted March 20, 2007 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 More sharing options...
per1os Posted March 21, 2007 Share Posted March 21, 2007 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 More sharing options...
Brudus Posted March 21, 2007 Author Share Posted March 21, 2007 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! Link to comment https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211684 Share on other sites More sharing options...
per1os Posted March 21, 2007 Share Posted March 21, 2007 It could be in the login.php. Basically when a new user registers what filename is it trying to send them to to validate? That should give you the first hint. Link to comment https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211691 Share on other sites More sharing options...
Brudus Posted March 21, 2007 Author Share Posted March 21, 2007 So in this case, it'd be Module.php? phpnuke.org/modules.php?name=Your_Account&op=activate&username=test22&check_num=664791ffb241e thats the link its giving in the email.. sorry for being a nub, im just confused, lol Link to comment https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211700 Share on other sites More sharing options...
per1os Posted March 21, 2007 Share Posted March 21, 2007 Yep, you just need to find where the op=Activate takes place and look for that in the code. Also if it is pointing to phpnuke.org you need to change that in the settings for phpnuke probably something like "Site Address". Link to comment https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211702 Share on other sites More sharing options...
Brudus Posted March 21, 2007 Author Share Posted March 21, 2007 okay, now how do i "open" a .php file to edit inside of the module.php Okay, the place i've got it uploaded has an online viewer that im using, im looking through modules.php and unfortunatley dont see anything for validation. Link to comment https://forums.phpfreaks.com/topic/43586-help-a-php-noob-p/#findComment-211717 Share on other sites More sharing options...
Brudus Posted March 21, 2007 Author Share Posted March 21, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.