Hi Massimo, Thanks for the reply. I'm still not certain the best place to do this. Is there a callback within the login processing where I can stick this code, or should I use _next in the CAS redirect to go to a controller that will do this?
Thanks, Rob On Thursday, January 16, 2014 5:17:26 PM UTC-5, Massimo Di Pierro wrote: > > You can do > > if auth.user and not auth.user.first_name: > .... pull them from ldap and store them in auth.user.... > > On Thursday, 16 January 2014 16:10:18 UTC-6, Robert Bjornson wrote: >> >> Hi, >> >> I'm trying to use our university CAS server as the authentication for my >> web2py app. I am able to direct logins to CAS fine, by using this code in >> my model file: >> >> auth=Auth(db, cas_provider='https://securedev.its.yale.edu/cas') >> >> After completing the cas login, when I look at db.auth_user table, or >> session.auth.user, only auth_user.registration_id has a value, which is >> https://securedev.its.yale.edu/cas/rdb9. >> >> If I do subsequent logins using the same login name, web2py finds the >> existing user entry and gives me that id. So far so good. >> >> My question is, how can I cleanly fill in the other fields of the user >> entry (things like firstname, lastname, etc.). I can pull them from my >> local ldap >> server using the login name. But, what is the clean way to push them >> into the database when the record is first created? Is there a callback to >> login that I can use for this? >> >> Thanks, >> >> Rob >> >> -- 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 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.