I have setup the email verification according to the instructions
online, but everyone is still able to login with no issues.
I know the email is setup properly as I have used the same settings for
emailing to others with my website.
I am using Gmail's smtp to do the emailing.
Any ideas?
This is in my model.
db.define_table('users',
        SQLField('nickname', 'string', length=20),
        SQLField('first_name', 'string', length=15),
        SQLField('last_name', 'string', length=15),
        SQLField('phone_number', 'string', length=15),
        SQLField('email', 'string'),
        SQLField('password', 'password'),
        SQLField('university_affiliation', 'string', length=25),
        SQLField('created', 'datetime', default=now, readable=False,
writable=False),
        SQLField('registration_key', length=128, writable=False,
readable=False, default=''),
        SQLField('avatar', 'upload'),
        SQLField('short_description','text'))

#######################################
# Authentication System
#######################################
from gluon.tools import Mail, Auth

mail = Mail()
mail.settings.server='smtp.gmail.com:587'
mail.settings.sender= 'interes...@gmail.com'
mail.settings.login='interes...@gmail.com:-----------'

class MyAuth(Auth):
    def __init__(self, environment, T, db = None):
        "Initialise parent class & make any necessary modifications"
        Auth.__init__(self,environment,db)
        self.messages.logged_in = T("Logged in")
        self.messages.email_sent = T("Email sent")
        self.messages.email_verified = T("Email verified")
        self.messages.logged_out = T("Logged out")
        self.messages.registration_successful = T("Registration
successful")
        self.messages.invalid_email = T("Invalid email")
        self.messages.invalid_login = T("Invalid login")
        self.messages.verify_email_subject = T("Password verify")
        self.messages.username_sent = T("Your username was emailed to
you.")
        self.messages.new_password_sent = T("A new password was emailed
to you.")
        self.messages.password_changed = T("Password changed")
        self.messages.retrieve_username=str(T("Your username is:"))+":
%(username)s"
        self.messages.retrieve_username_subject="Username retrieve"
        self.messages.retrieve_password=str(T("Your password is:"))+":
%(password)s"
        self.messages.retrieve_password_subject = T("Password retrieve")
        self.messages.profile_updated = T("Profile updated")
        self.settings.table_user = db.users

auth = MyAuth(globals(), T, db)
auth.settings.mailer = mail
auth.define_tables()

Should it not wait for an email confirmation?
Regards,
Jason


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to