On Jun 2, 1:52 pm, weheh <[email protected]> wrote: > @hamdy.a.farag: sweeeeet. One of these days I have to memorize the > bazillion or so auth.settings.
.... or simply use an IDE / debugger which will do completions for you! > > On Jun 2, 12:53 pm, "hamdy.a.farag" <[email protected]> wrote: > > > in your model add something like > > > def set_message(form): > > session.flash = T('hello %(name)s', dict(name=auth.user and > > auth.user.first_name)) BTW - you can access auth in your templates (no need to pass - auth is in globals - and you can check to ensure in your templates, e.g. something like: {{ if 'auth' in globals(): }} {{ if not auth.user:}} <a href="{{=URL(r=request, f='user/login')}}"> {{=T('login')}} </ a> {{ else: }} {{ =auth.user.first_name }} <a href="{{=URL(r=request, f='user/logout')}}"> {{=T('logout')}} </a> {{ pass }} {{ pass }} > > > auth.settings.login_onaccept = set_message

