Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-06-2012, 09:53 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,340
SilverDragonTears is on a distinguished road
Default Invalid Email/Can't view new members

I don't know what I did.... but people can't view new member's profiles and most people registering are having an invalid email issue. Here is my register script.... see anything out of the ordinary?

PHP Code:
<?php

include("functions/functions.php");
include(
"functions/functions_users.php");
include(
"inc/config_forum.php");
include(
"inc/lang.php");

//***************//
//  START SCRIPT //
//***************//

if($isloggedin == "yes"){

$article_title "You already have an account";
$article_content "You already have an account, thus there is no need for you to register a new one.";

}
else{

//Grab the post data from the form

$username $_POST["username"];
$username secure($username);
$pass1 $_POST["pass1"];
$pass1 secure($pass1);
$pass2 $_POST["pass2"];
$pass2 secure($pass2);
$email $_POST["email"];
$ip $_POST['ip'];
$birthday $_POST['birthday'];
$avatar $_POST["avatar"];
$tos $_POST["tos"];
$hidden $_POST["hidden"];
$answer $_POST["answer"];
$answer2 $_POST["answer2"];

    if(
$hidden != "goregister"){

    
//The form was not submitted, so we are showing the signup page...
    
$question grabanysetting("securityquestion");
    
$answer grabanysetting("securityanswer");
    
$article_title $regnew;
    
$article_content $regnewexplain."<br><form name='form1' method='post' action='register.php'>
      <p>Username: <input name='username' type='text' id='username' maxlength='20'></p>
      <p>Your username may be up to 20 characters long and may only contain letters, numbers and spaces. </p>
      <p>Password: <input name='pass1' type='password' id='pass1' maxlength='20'></p>
      <p>Your password may be up to 20 characters long and may contain letters, numbers, spaces and special characters. The use of a special character, such as * or ! is recommended for increased security. </p>
      <p>Confirm Password: <input name='pass2' type='password' id='pass2' maxlength='20'></p>
      <p>Email Address: <input name='email' type='text' id='email'></p>
    <p>Birthday(mm/dd/yyyy): <input name='birthday' type='text' id='birthday'></p>
      <p>Avatar url: <input name='avatar' type='text' id='avatar' value='templates/icons/default_avatar.gif'></p>
    <p>Security Question: 
{$question}
    <input name='answer' type='hidden' id='answer' value='
{$answer}'></p>
    <p>Answer: <input name='answer2' type='text' id='answer2'></p>
      <p><input name='tos' type='checkbox' id='tos' value='yes'> I agree to the <a href='tos.php' target='_blank'>Terms of Service</a>. 
      <input name='ip' type='hidden' id='ip' value='
{$_SERVER['REMOTE_ADDR']}'></p>
    <input name='hidden' type='hidden' id='hidden' value='goregister'></p>
      <p><input type='submit' name='Submit' value='Register'>
      </p></form>"
;


    }
    else{

    
//We are attempting to register the user...
    
    
$salt codegen(150);
    
$password1 passencr($username$pass1$salt);
    
$password2 passencr($username$pass2$salt);

    
//Next check that the username does not already exist...

    
$flag 0;
    
$stmt $adopts->query("SELECT * FROM {$prefix}users WHERE username = '$username'");
    
$row $stmt->fetchObject();

    if(
is_object($row)) $flag 1;
    
//Now we verify that the email address is a valid email address...
    
$emailisvalid "no";
    
$regex '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'
    
    if(
preg_match($regex$email)) $emailisvalid "yes";
    
    
//First check that something required was not left blank...

    
if($username == "" or $password1 == "" or $password2 == "" or $email == ""){
    
$article_title "Error";
    
$article_content $regblank;
    }
    else if(
$password1 != $password2){
    
    
//Passwords do not match

    
$article_title "Your passwords do not match";
    
$article_content $passnomatch;

    }
    else if(
$tos != "yes"){

    
//User did not agree to TOS
    
$article_title "Terms of Service Error";
    
$article_content $notos;

    }
    else if(
$flag 0){

    
//Username already exists
    
$article_title "Your username already exists";
    
$article_content $userexists;    

    }
    else if(
$emailisvalid != "yes"){

    
//Email address is not valid or is a fake

    
$article_title "Email address is not valid";
    
$article_content $emailinvalid;

    }
    else if(
$answer != $answer2){

    
//Email address is not valid or is a fake

    
$article_title "An error has occurred";
    
$article_content "It seems that you did not answer the security question correctly...";

    }
    else{

    
//All checks are done, actually create the user's account on the database

    
$date date('Y-m-d');
    
$session session_id();
    
$myssession md5($uid.$session);
    
$adopts->query("INSERT INTO {$prefix}users (uid, username, salt, password, session, email, ip, usergroup, birthday, membersince, money, friends)
                                        VALUES ('', '
$username', '$salt', '$password1', '$myssession', '$email','{$_SERVER['REMOTE_ADDR']}','3','$birthday', '$date', '{$GLOBALS['settings']['startmoney']}','')");
    
    
$adopts->query("INSERT INTO {$prefix}users_contacts (uid, username, website, facebook, twitter, aim, yahoo, msn, skype)
                                                 VALUES ('', '
$username', '', '', '', '', '', '', '')");

    
$adopts->query("INSERT INTO {$prefix}users_options (uid, username, newmessagenotify, pmstatus, vmstatus, tradestatus, theme)
                                                VALUES ('', '
$username', '1', '0', '0', '0', '{$GLOBALS['settings']['theme']}')");

    
$adopts->query("INSERT INTO {$prefix}users_profile (uid, username, avatar, bio, color, about, favpet, gender, nickname)
                                                VALUES ('', '
$username', '$avatar', '', '', '', '0', 'unknown', '')");
    
    
$adopts->query("INSERT INTO {$prefix}users_status (uid, username, canlevel, canvm, canfriend, cantrade, canbreed, canshop)
                                               VALUES ('', '
$username', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes')");
    
    
//Now check if Mybb forum integration is enabled
    
if($mybbenabled == 1){
      
//Mybb forum integration is enabled, now generate the user account on Mybb forum!
      
$dsn2 "mysql:host={$mybbhost};dbname={$mybbdbname}";
      
$forums = new PDO($dsn2$mybbuser$mybbpass) or die("Cannot connect to forum database, please contact an admin immediately.");

      
//Now the database has been switched to mybb forum's. Before inserting user info, lets generate the password and salt in Mybb format.
      
$salty codegen(80);
      
$loginkey codegen(500);
      
$md5pass md5($pass1);
      
$fpass md5(md5($salty).$md5pass); 
      
$ip $_SERVER['REMOTE_ADDR'];
      
$altip ipgen($ip);  
      
$query2 "INSERT INTO {$mybbprefix}users (uid, username, password, salt, loginkey, email, postnum, avatar, avatardimensions, avatartype, usergroup, additionalgroups, displaygroup, usertitle, regdate, lastactive, lastvisit, lastpost, website, icq, aim, yahoo, msn, birthday, birthdayprivacy, signature, allownotices, hideemail, subscriptionmethod, invisible, receivepms, receivefrombuddy, pmnotice, pmnotify, threadmode, showsigs, showavatars, showquickreply, showredirect, ppp, tpp, daysprune, dateformat, timeformat, timezone, dst, dstcorrection, buddylist, ignorelist, style, away, awaydate, returndate, awayreason, pmfolders, notepad, referrer, referrals, reputation, regip, lastip, longregip, longlastip, language, timeonline, showcodebuttons, totalpms, unreadpms, warningpoints, moderateposts, moderationtime, suspendposting, suspensiontime, suspendsignature, suspendsigtime, coppauser, classicpostbit, loginattempts, failedlogin, usernotes)
                                                                               VALUES ('', '
$username', '$fpass','$salty','$loginkey','$email', '0', '', '', '0', '2', '', '0', '', 'time()', 'time()', 'time()', '0', '', '', '', '', '', '$birthday', 'all', '', '1', '0', '0', '0', '1', '0', '1', '1', '', '1', '1', '1', '1', '0', '0', '0', '', '', '0', '0', '0', '', '', '0', '0', '0', '', '', '', '', '0','0','0','$ip', '$ip','$altip','$altip','','0','1', '0', '0', '0','0','0','0','0','0','0','0','0','1','0','')";
      
$forums->query($query2) or die("Failed to create forum account");
    }    

    
//Now that we have created the user, let's log them in...

    
$status dologin($username$password1$myssession);

    if(
$status != "success"){
    
    
$article_title "Something is Wrong!";
    
$article_content "Something is very, very wrong.  Please contact Mysidia Adoptables about this error.";

    }
    else{

    
//We are registered and logged in...

    
$article_title $titleregsuccess;
    
$article_content $regsuccess."".$username."".$regsuccess2;

    if(
$mybbenabled == 1){
      
$article_content .= "</br></br>You may also visit your <a href='http://taleofdragons.net/forum'>forum account</a> and edit your profile."
    }

    
//Reflect our changes in the sidebar... 
    
$sidebar "<b><u>Welcome {$username}</u></b>:<br><a href='account.php'>Go to My Account</a><br><a href='adopt.php'>Adopt Some Pets</a>";

    }


    }
    


    }

}

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title$article_content$date);

?>
__________________

Check out SilvaTales
Reply With Quote
  #2  
Old 04-06-2012, 10:48 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,257
Hall of Famer is on a distinguished road
Default

umm did you change the script at all? If not this is gonna be a strange issue, but I will look into it once I release Mys v1.3.1 soon.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 04-07-2012, 10:02 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,340
SilverDragonTears is on a distinguished road
Default

Not that I can remember.
__________________

Check out SilvaTales
Reply With Quote
  #4  
Old 04-08-2012, 12:30 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,257
Hall of Famer is on a distinguished road
Default

I do not have invalid email problem on the demo site, it seems that emails with gmail, msn, hotmail, aim and yahoo all work out pretty nicely.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid ID Breeding Error Abronsyth Questions and Supports 1 10-13-2014 08:47 AM
Adoptable Is Invalid Hwona Questions and Supports 5 09-02-2013 07:36 AM
Invalid adoptable ID quirkii Questions and Supports 1 08-17-2012 03:33 AM
So old premium members aren't premium members anymore? wilfred888 Feedback and Suggestions 3 02-19-2011 08:44 PM
Invalid Adoptable ID Specified trollis76 Questions and Supports 2 05-13-2009 12:47 AM


All times are GMT -5. The time now is 04:42 AM.

Currently Active Users: 9757 (0 members and 9757 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636