another message disappeared... i think i clicked the wrong button, reply to 
author instead of post... sorry massimo, my messages might come to you as a 
PM. will be careful in future.

I got the insert to work with this, I guess unicode is needed.

        db.auth_user.bulk_insert([{'first_name' : myname,
            'email' : myemail,
            'password' : 
db.auth_user.password.validate(mypassword.encode('utf8'))[0]
        }])

But now I am having issues with validating the logins.. I tried these 
statements.... password matching fails.

    record = db(db.auth_user.email == myemail ).select()
    if len(record):
        logger.debug("user with email - %s found" % myemail)
    else:
        logger.debug("user with email - %s not found" % myemail)

    record = db(db.auth_user.password == 
db.auth_user.password.validate(mypassword.encode('utf8'))).select()
    if len(record):
        logger.debug("user with email - %s has valid password" % myemail)
    else:
        logger.debug("user with email - %s does not have a valid password" 
% myemail)

And tried this combined one also.        

    record = db(db.auth_user.email == myemail and db.auth_user.password == 
db.auth_user.password.validate(mypassword.encode('utf8'))).select()

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to