[web2py] auth_user missing signature

2022-06-07 Thread Vlad
I just realized that auth_user has no signature by default. I've just changed it, but wondering if there is a trick to find out when the existing users were created - maybe some history / log of some kind somewhere? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] auth_user automatically lowercase all email fields

2019-04-08 Thread lucas
hello one and all, i'm using web2py 2.17>. what is the best method to impose and automatically update the email field to all lowercase characters without making the user have to retype the email??? i want web2py to lowercase no matter its a new registration (insert) or profile (update). than

[web2py] auth_user change field order

2019-04-08 Thread lucas
hello one and all, i'm using web2py 2.17>. what is the best method to change the field order on the view's user/profile and user/register when adding fields like??? auth.settings.extra_fields['auth_user'] = [ Field('prefix_title', length=4, requires=IS_IN_SET(('Mr.','Ms.','Mrs.','Dr.')), c

[web2py] 'auth_user' not recognized in IS_IN_DB validator

2018-06-05 Thread b.l. masters
Hi I am using a validator (that previously worked) in a db model, and which now will not recognize the 'auth_user' table in the IS_IN_DB validator: db.tablenamehere.username.requires = [IS_IN_DB(db, 'auth_user.username', error_message=T('User must already exist to associate with these services

[web2py] auth_user email field

2017-08-26 Thread Andrea Fae'
Hello, is it possible to get email field in auth_user table not unique? I don't use email form accessing but username. I don't want to create a custom auth_user table if it's possible. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

[web2py] auth_user email field

2017-06-02 Thread Andrea Fae'
Email field in auth_user table is obligatory. Is it possible to get this field not obligatory? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You

[web2py] auth_user email rename name to data attribute

2017-04-11 Thread lucas
hello one and all, I'm not sure of the mechanism here. using SQLFORM on auth_user table and I tried to form.element().update(_name=None, _id=None, _data="field_name") so that the browser won't auto fill the values with the user's email and password. but it doesn't seem to work. it is still s

[web2py] auth_user referencing customer table AND linked_tables link broke when constraints was used issues

2017-03-29 Thread Rudy
Hi there, this is my 3 attempts sending questions to this forum, i see people sending questions here, but I don't see mine after I posted and didn't get any reply. If someone can provide pointers, it's much appreciated. (I just checked everything in the "Membership and email setting", hope this

[web2py] auth_user boolean extrafield odd behavior

2016-05-29 Thread Pierre
Hi, I defined an auth_user boolean extra field which default value is False then I updated its value to True Now if I login with this user and try to access the boolean value via* auth.user.extraField* it's still False here is the controller.function: def auser(): u= auth.user.username

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-07 Thread Massimo Di Pierro
Good catch Anthony! On Wednesday, 6 April 2016 13:35:39 UTC-5, Anthony wrote: > > table = db.auth_user >> fields = ['id','first_name'] >> fields.append('test_field_1') >> >> query = table.id > 0 >> >> row = db(query).select(*fields).first().as_dict() >> > > The proble

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Ah! Of course. Thanks Anthony! I knew it was something dumb i did =) -Mark On Wed, Apr 6, 2016 at 11:35 AM, Anthony wrote: > table = db.auth_user >> fields = ['id','first_name'] >> fields.append('test_field_1') >> >> query = table.id > 0 >> >> row = db(query).select(*fiel

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Anthony
> > table = db.auth_user > fields = ['id','first_name'] > fields.append('test_field_1') > > query = table.id > 0 > > row = db(query).select(*fields).first().as_dict() > The problem is that you aren't passing the correct arguments to .select(). You must pass Field ob

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Offending code from a fresh web2py welcome app: in db.py before auth.define_tables() from gluon.contrib.populate import populate auth.settings.extra_fields['auth_user'] = [Field('test_field_1','boolean')] in controller default.py def test(): if db(db.auth_user.id>0).isempty(): po

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Hey Anthony and Richard, Yes you are both correct. I am attempting to create a usable JSON object. The confounding details from what I can tell are: 1.) the offending method is defined in a model file, which returns a dictionary, which is then json serialized via response.json(RETURNED_FROM_MO

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Richard Vézina
Yeah you right... On Wed, Apr 6, 2016 at 12:06 PM, Anthony wrote: > On Wednesday, April 6, 2016 at 11:30:34 AM UTC-4, Richard wrote: >> >> You maybe right Anthony abour update_record() it really depend though of >> what he is trying todo... >> > > Well at the point where row.update() is called,

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Anthony
On Wednesday, April 6, 2016 at 11:30:34 AM UTC-4, Richard wrote: > > You maybe right Anthony abour update_record() it really depend though of > what he is trying todo... > Well at the point where row.update() is called, row is already a dictionary, so there is no .update_record() at that point.

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Richard Vézina
You maybe right Anthony abour update_record() it really depend though of what he is trying todo... :) Richard On Wed, Apr 6, 2016 at 11:21 AM, Anthony wrote: > On Wednesday, April 6, 2016 at 11:20:44 AM UTC-4, Anthony wrote: >> >> On the other hand I am curious that you update row with simple

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Anthony
On Wednesday, April 6, 2016 at 11:20:44 AM UTC-4, Anthony wrote: > > On the other hand I am curious that you update row with simple update(), >> you suppose to use update_record() >> > > They are both valid methods -- .update updates the Row object itself (like > updating a dictionary), whereas .

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Anthony
> > On the other hand I am curious that you update row with simple update(), > you suppose to use update_record() > They are both valid methods -- .update updates the Row object itself (like updating a dictionary), whereas .update_record updates the record in the database. You can actually iss

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Richard Vézina
Hello Mark, Not sure about the bool part, I think web2py treat bool like that to comply with all the different backend and the apdater does the rest... On the other hand I am curious that you update row with simple update(), you suppose to use update_record() Ref: http://www.web2py.com/books/def

[web2py] auth_user extra fields + row.to_dict()

2016-04-05 Thread Mark Graves
Hey everyone, I saw a random bug in an app I'm working on, and I was wondering what the correct approach is. I have auth.settings.extra_fields["auth_user"] = [LIST_OF_FIELDS] later, I select that row and get it as a dict: row = db(db.auth_user.id == user_id).select().first().as_dict() then I

[web2py] auth_user table

2016-03-25 Thread Jerry Liu
Hello, all I found something really weird happened to my auth_user table. whenever I try to add a new user to auth_user table, it gives me a default value 38 for the *Created By* field. So I keep getting IntegrityError: *FOREIGN KEY constraint failed *because there is not such a user with id

[web2py] Auth_user add username field

2016-03-23 Thread Jerry Liu
Hello, all I want to add a *username* field to auth_user table. I figured out I can use the following line of code to do so, but how can I use *username *instead of *email *in login and registration process? auth.settings.extra_fields[auth.settings.table_user_name] = [ Field] -- Resources: -

[web2py] Auth_user dynamic cascading registration fields

2015-07-28 Thread Wabbajack
I have created a *factory,department,section and team* table in the database and a *factory* is on a *one to many* relationship with *department* a *department* is on a *one to many* relationship with* section* a *section* is on a *one to many* relationship with* team* *Table names* factory = p

[web2py] auth_user extra fields and pcrypt

2015-05-21 Thread Annet
I've got the following auth_user table definition: ## add extra fields to auth_user table auth.settings.extra_fields['auth_user']= [ Field('username', length=32, default='', requires=[IS_LENGTH(32, error_message='Lengte overschreidt 32 tekens'), IS_NOT_EMPTY(error_message='Vul gebruikersnaam i

[web2py] auth_user table format

2015-04-05 Thread 黄祥
hi, i tried to have auth_user a proper format record representation, but it end with just the id shown on the table. e.g. *models/db.py* custom_auth_table = db[auth.settings.table_user_name] custom_auth_table._format = '%(first_name)s %(last_name)s' auth.settings.table_user = custom_auth_table *

[web2py] Re: How to properly import Active Directory users into web2py auth_user table?

2015-03-05 Thread Dave S
Glad to hear that you were successful. Return types can keep us on our toes, can't they? /dps On Thursday, March 5, 2015 at 3:30:02 PM UTC-8, Grzegorz Dzień wrote: > > Found it, it was that values I was importing were tuples, it works given I > access "first tuple item" e.g.: > first_name=use

[web2py] Re: How to properly import Active Directory users into web2py auth_user table?

2015-03-05 Thread Grzegorz Dzień
Found it, it was that values I was importing were tuples, it works given I access "first tuple item" e.g.: first_name=user[1]['givenName'][0] On Wednesday, March 4, 2015 at 8:59:32 PM UTC+1, Grzegorz Dzień wrote: > > I have tried doing it this way: > > def showthemall(): > # LDAP connection s

[web2py] How to properly import Active Directory users into web2py auth_user table?

2015-03-04 Thread Grzegorz Dzień
I have tried doing it this way: def showthemall(): # LDAP connection settings LDAP_SERVER = "ldap://ad.superhost"; BIND_DN = "superuser@ad.superhost" BIND_PASS = "mysupersecretpassword" # Connect to LDAP con = ldap.initialize(LDAP_SERVER) # Authenticate in LDAP con.

[web2py] auth_user uppercase

2015-02-25 Thread Gael Princivalle
Hello. In my db I have this discounts table: db.define_table('discounts', Field('user_id', 'reference auth_user'), Field('brand', 'reference brands', requires = IS_IN_DB(db, db.brands.id, '%(name)s'), represent=lambda id, r: db.brands[id].name

[web2py] auth_user table referenced table

2015-02-12 Thread Yebach
Hello I have a question regarding adding extra fields to auth_user table now I saw a couple of posts but none answers my question I have a table organization. On user registration user adds organization name in form. this value should be inserted into table organization and id of the record i

Re: [web2py] auth_user and pool_size?

2014-04-30 Thread Annet
Hi Simone, are you sure that what you're reporting is exactly what's happening ? > That's exactly what I observe and it bothered me because I expected the behavior you describe in your reply. I haven't had this problem for a long time. Both web2py_development and web2py_deployment run on my Mac

Re: [web2py] auth_user and pool_size?

2014-04-30 Thread Richard Vézina
Yes I use pgAdmin3. I set "migrate=False" on every table and in the connection string I set "migrate_enabled=False". No fake_migrate... I just deactivate the migration stuff of web2py. I didn't read the book about migration for a long time so there is maybe new way of doing thing... But so far I d

Re: [web2py] auth_user and pool_size?

2014-04-30 Thread Niphlod
If you don't change this line both in production and in test auth.define_tables(migrate=False, username=True, signature=False) the error that you are getting will NEVER pop up. If migrate=False, web2py doesn't attempt to create the auth tables, so the error "table_auth_user already exists" DOE

Re: [web2py] auth_user and pool_size?

2014-04-29 Thread Annet
Hi Richard, Thanks for you reply. Personally, because I didn't have the control I want on migration, and I > don't want to lost data. I don't do that. I update the prod database > manually... > I've considered this too but wasn't sure about how to proceed. What you do is alter your database

Re: [web2py] auth_user and pool_size?

2014-04-29 Thread Richard Vézina
Hello Annet, I am pretty sure this as notting to do with pool_size... It must be related to migration. Since the change you made have been applied to the dev db, web2py migration metadata (/database/*) tells web2py that migration is done. When you push your app in prod, web2py still think migratio

[web2py] auth_user and pool_size?

2014-04-29 Thread Annet
I installed web2py 2 times, once for development and once for production. The db.py file in the development version has the following connection string: db = DAL('postgres://username:password@localhost:5432/db_development', lazy_tables=True, migrate_enabled=False, pool_size=1, check_reserved=['

[web2py] auth_user table 'email' field unique issue

2013-10-04 Thread Srini K
I have a question related to "*auth_user*" table. So far I was under impression "*email*" field is a unique field where no two rows can have the same "email". But with a use case I tried and have described below I ended up with 2 rows in "auth_user" with same email ! My app and the use case: 1

[web2py] auth_user reference to other table

2012-04-06 Thread BlueShadow
Hi, i like to ask the user for his country. So I added a field country to the auth_user table. but I like it to be a referenz to db.country which I define later in the db.py file. for some reason I get an error message when trying to do that.

Re: [web2py] auth_user table password requires=is_not_empty() get overrided

2012-02-22 Thread Richard Vézina
I see... Thank you Anthony! Richard On Wed, Feb 22, 2012 at 12:32 PM, Anthony wrote: > By default, CRYPT generates a hashed value even if you submit an empty > string, so if you put IS_NOT_EMPTY after CRYPT, it will pass validation. > However, there's no reason to use IS_NOT_EMPTY because CRYP

Re: [web2py] auth_user table password requires=is_not_empty() get overrided

2012-02-22 Thread Anthony
By default, CRYPT generates a hashed value even if you submit an empty string, so if you put IS_NOT_EMPTY after CRYPT, it will pass validation. However, there's no reason to use IS_NOT_EMPTY because CRYPT itself takes a min_length argument, which defaults to 0. Note, there is also an Auth setti

[web2py] auth_user table password requires=is_not_empty() get overrided

2012-02-22 Thread Richard
Hello, User are allow to enter noting when they change their password in application/user/change_password form, I can also create user without password in appadmin even if I set requires=is_not_empty() in the model of auth_user table. # Here my model definition : auth_table = db.define_table(

[web2py] auth_user approval pending

2012-01-04 Thread OpenMercury
Hi, I'm using the basic scaffolding app and have set it up so new users need to be approved to use the application. I'm registered and there is an entry in auth_user table. The registration key field value is 'Pending'. From reading the docs, all I should have to do is blank out the registration

Re: [web2py] auth_user represent

2011-11-03 Thread Richard Vézina
Be aware that with 1.99.2 you need to write it like this : db.auth_user.id.represent = lambda id*, row*: db.auth_user(id).first_name if id!=None else 'N/A' Even if you don't need the row element... Richard On Thu, Nov 3, 2011 at 4:28 PM, Richard Vézina wrote: > Is this what you trying to do :

Re: [web2py] auth_user represent

2011-11-03 Thread Richard Vézina
Is this what you trying to do : db.auth_user.id.represent = lambda id: db.auth_user(id).first_name if id!=None else 'N/A' On Thu, Nov 3, 2011 at 4:08 PM, Bianca Cadaveri wrote: > Hello, > > I have a number representing somebody in auth_user. How can I get the > username back ? db.auth_user.id.re

[web2py] auth_user represent

2011-11-03 Thread Bianca Cadaveri
Hello, I have a number representing somebody in auth_user. How can I get the username back ? db.auth_user.id.represent(this_number) does not work. Can somebody please help me ? Thank you, BC

[web2py] auth_user

2011-10-23 Thread lucas
hello one and all, playing with auth_user. trying to follow the manual with a bit of modification, thinking: auth = Auth(db)# authentication/ authorization auth.settings.extra_fields['auth_user'] = [ Field('prefix_title', length=12, comment='Enter your Name Pr

Re: [web2py] auth_user fields writable/readable False

2011-08-31 Thread Bruno Rocha
You can also do: auth.settings.profile_fields = ['first_name','last_name','email'] # a list with fields and the order you want to bw shown in profile page. -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuid

Re: [web2py] auth_user fields writable/readable False

2011-08-31 Thread Richard Vézina
http://web2py.com/book/default/chapter/08?search=setting#Customizing-Auth Maybe you can try at the model level? Also if you define your auth tables and rename it you maybe have to use the new name... Not sure of that actually. Richard On Wed, Aug 31, 2011 at 1:05 PM, annet wrote: > I have two

Re: [web2py] auth_user fields writable/readable False

2011-08-31 Thread Bruno Rocha
are you creating the form object before or after this? You need to specify attributes before the creation of the form object. db.table.field.readable = False form = FORM() return dict(form=form) My way of doing it if 'register' in request.args: auth_user_opt = ['twitter','facebook','p

[web2py] auth_user fields writable/readable False

2011-08-31 Thread annet
I have two fields in the auth_user table which I don't want to be visible when the user edits his profile. In def user(): I set: def user(): if request.args(0)=='profile': db.auth_user.comment.readable=False db.auth_user.comment.writable=False db.auth_user.repl

[web2py] auth_user customization

2011-08-18 Thread Gregory Hellings
I was using the following db.py (http://pastie.textmate.org/2389614) and db_auth.py (http://pastie.textmate.org/2389616) files in a project successfully in 1.95.*. When I upgraded to 1.97 and now 1.98 I get the following error (http://dumpr.info/v/2kc) whenever I try to load a page in the applicat

[web2py] Auth_user ondelete

2011-06-09 Thread Thiago Carvalho D' Ávila
Hi, I'm new to web2py, but familiar to similar frameworks. I have a system that uses web2py builtin auth_user table. The problem is that I wanna use ondelete='NO ACTION' in my app (it is CASCADE by default), and I don't know how to put it in the model file. Anyone can help? Att. Thiago

[web2py] auth_user manually insert/update the password

2011-04-12 Thread Bob
Hello, could someone answer a couple of questions: 1. Is it possible to manually crypt the password in the same way that crud() does it? The reason is that I need to manually update the user with db().update() and can't use crud 2. In similar situation using SQLFORM. When updating the user it's l

[web2py] auth_user field default to other auth_user field?

2011-03-23 Thread pbreit
I can't seem to figure out a (good) way to have one of my auth_user fields default to another auth_user field. I only want the default to take place once so not "compute". I tried defaulting to a lambda but that doesn't work. db.define_table('auth_user', ... Field('email', length=128, r

Re: [web2py] auth_user registration, password field: Order is relevant (OR other reason) OR bug?

2010-02-11 Thread Jonathan Lundell
On Feb 11, 2010, at 8:17 AM, Alexandre Andrade wrote: > Others parts of web2py code can rely in a non-empty password. It's always non-empty once it's hashed, and only the hash is retained. > > > > 2010/2/11 Jonathan Lundell > On Feb 11, 2010, at 7:57 AM, Alexandre Andrade wrote: > >> I'm t

Re: [web2py] auth_user registration, password field: Order is relevant (OR other reason) OR bug?

2010-02-11 Thread Alexandre Andrade
Others parts of web2py code can rely in a non-empty password. 2010/2/11 Jonathan Lundell > On Feb 11, 2010, at 7:57 AM, Alexandre Andrade wrote: > > I'm trying to customize auth for a long time, without sucess. > > Massimo said have a bug fixed in trunk, so I'm waiting the new version to > see

Re: [web2py] auth_user registration, password field: Order is relevant (OR other reason) OR bug?

2010-02-11 Thread Jonathan Lundell
On Feb 11, 2010, at 7:57 AM, Alexandre Andrade wrote: > I'm trying to customize auth for a long time, without sucess. > > Massimo said have a bug fixed in trunk, so I'm waiting the new version to see > if it works. > > But in your case, I think its not possible CRYPT() nothing... so makes se

Re: [web2py] auth_user registration, password field: Order is relevant (OR other reason) OR bug?

2010-02-11 Thread Alexandre Andrade
I'm trying to customize auth for a long time, without sucess. Massimo said have a bug fixed in trunk, so I'm waiting the new version to see if it works. But in your case, I think its not possible CRYPT() nothing... so makes sense IS_NOT_EMPTY first. 2010/2/11 aure > Hi everyone, > > I have cu

[web2py] auth_user registration, password field: Order is relevant (OR other reason) OR bug?

2010-02-11 Thread aure
Hi everyone, I have customised my table for authentificaition, as shown by Massimo here: http://groups.google.com/group/web2py/browse_thread/thread/f4ae0f4c5b9336d0/327ff8e49d88fbb3?lnk=gst&q=custom+authentication+form#327ff8e49d88fbb3 If I put CRYPT() before IS_NOT_EMPTY(...) in the list of requ