Il 23/03/2012 10:40, bussiere adrien ha scritto:
# -*- coding: utf-8 -*-
def ensurefirstuser(firstname,lastname,email,password)​:
    users = db(db.auth_user.email==email).​select()
    if users:
        user_id = users[0].id
        created = False
        if settings.debug_ensure_first_​user == True:
            print ('found user_id so created equals %s') % created
        return (user_id,created)

    else:
        my_crypt = CRYPT(key=auth.settings.hmac_​key)
        crypt_pass = my_crypt(password)[0]
        id_user= db.auth_user.insert(
                              ​     first_name=firstname,
                              ​     last_name=lastname,
                              ​     email = email,
                              ​     password = crypt_pass
                              ​     )
        created = True
        if settings.debug_ensure_first_​user == True:
            print ('creating user_id')
        return (id_user,created)


Here i truly don't understand why it still say invalid syntax and i'am investing on it fr hours ...

Regards
Bussiere

Can you provide the line error or the whole ticket error?

    M.

Reply via email to