*Create this function in some model*
*
*

> *def new_user(first_name, last_name, email, passw):
> **        users = db(db.auth_user.email==email).select()
> **        if users:
> **            return users[0].id
> **        else:
> **            my_crypt = CRYPT(key=auth.settings.hmac_key)
> **            crypt_pass = my_crypt(passw)[0]
> **            id_user= db.auth_user.insert(
> **                                       first_name=first_name,
> **                                       last_name=last_name,
> **                                       email = email,
> **                                       password = crypt_pass
>
> **                                       )
> **            return id_user*



Now create user with this:


*iduser = new_user('Chris','Mills','ch...@nobody.com','somepasswordhere')*


*Bruno Cezar Rocha** - @rochacbruno*
rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821
www.CursoDePython.com.br | www.rochacbruno.com.br
Blog: App news reading
(portuguese)<http://rochacbruno.com.br/app-news-reading-portuguese/>
  Get a signature like this.
<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
Click
here.<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>



On Thu, Sep 13, 2012 at 3:28 PM, Kenny <nis...@gmail.com> wrote:

> login_bare is so useful for accessing the database manually in mobile 
> application, is there anyway to let the users to register the website via 
> mobile application?
>
> ex) register_bare(id,password) -> Save it in the database -> user is 
> registered.
>
> I wasn't able to find how I should make this registration step for mobile app 
> + web2py.
>
> Thank you
>
>
>
>  --
>
>
>
>

-- 



Reply via email to