Jump to content


Photo
- - - - -

How to make users HAVING TO verify their email?

verify email verification

  • Please log in to reply
4 replies to this topic

#1 myporngirl

myporngirl

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 28 January 2014 - 09:25 PM

hey there!
 

As normal what other sites do is ... 
 
User Register >> Sites send mail to user account >> he verifies >> THEN HE can use site 
 
ON our 
 
User register >> he verify it or not ... >>> he can start using site 
 
NOW the problem on my site is ..i got few thousand users ,.. more then 30% are non verified ... now when my site sends newsletter or any reminder mail ... google see it as SPAM and made it in greylisting .. ive talked to google and they said they see user behaviour + bounced emails ... and now ive to STOP ALL MY MAILS because of it 
 
 
Can anybody help me change the code in login.php so that users HAVE to verify their email? I also get a lot of SPAM blogs because of this.. It would help me out a lot! 
 
Thanks in advance,
 
Matt

 



#2 theone

theone

    Senior Member

  • Members
  • PipPipPipPip
  • 371 posts

Posted 29 January 2014 - 04:01 AM

To make users not be able to login unless they have verified their email you can try......

 

Open login.php

 

Find....

            $password = md5($password);

Add below.....

            if ($user['0']['emailverified'] == 'no') {$errors[] = 'Please verify your account to login!';} else {

Find......

                        VRedirect::go($_URL);
                
                    } else {
                        $errors[] = $lang['login.invalid'];
                    }

Add below.....

}

This will display an error message to anyone who tries to login to an account that has not yet been verified.

 


  • Damien and myporngirl like this

#3 myporngirl

myporngirl

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 29 January 2014 - 10:14 AM

To make users not be able to login unless they have verified their email you can try......

 

Open login.php

 

Find....

            $password = md5($password);

Add below.....

            if ($user['0']['emailverified'] == 'no') {$errors[] = 'Please verify your account to login!';} else {

Find......

                        VRedirect::go($_URL);
                
                    } else {
                        $errors[] = $lang['login.invalid'];
                    }

Add below.....

}

This will display an error message to anyone who tries to login to an account that has not yet been verified.

Thanks man this fixed it! Thankyou for the fast reply, perfect! 



#4 Damien

Damien

    Junior Member

  • Members
  • PipPipPip
  • 78 posts

Posted 01 February 2014 - 08:09 AM

you can also alter the SQL in login.php for same effect

$sql  = "SELECT UID, email, pwd, emailverified, photo, fname, logintime, gender
                   FROM signup WHERE emailverified = 'yes' AND username = '" .mysql_real_escape_string($username). "' LIMIT 1";


#5 theone

theone

    Senior Member

  • Members
  • PipPipPipPip
  • 371 posts

Posted 02 February 2014 - 07:53 PM

 

you can also alter the SQL in login.php for same effect

$sql  = "SELECT UID, email, pwd, emailverified, photo, fname, logintime, gender
                   FROM signup WHERE emailverified = 'yes' AND username = '" .mysql_real_escape_string($username). "' LIMIT 1";

 

That's probably not the best solution as you would not get a specific error message specifying that the account needs to be verified (it would simply give you an invalid login error). You would still have to use PHP to deliver an appropriate error message.


  • Damien likes this