def set_welcome(form):
session.flash=T('hello %(name)s',
dict(name=auth.user.first_name))
auth.settings.login_onaccept=set_welcome
On Jun 3, 5:22 am, "hamdy.a.farag" <[email protected]> wrote:
> This's not working !!
>
> you need to set the message before actually logged in !!
> your solution just set the message after user is actually logged in so
> it's useless
> moreover, setting the logout message will not work, unless the index
> page itself has no flash message set
> or else the flash message in index age will override yours
>
> On Jun 3, 11:33 am, annet <[email protected]> wrote:
>
> > It's probably not the most elegant of solutions, but in db.py I simply
> > set:
>
> > if auth.is_logged_in():
> > auth.messages.logged_in='Logged in successfully, welcome ' +
> > auth.user.first_name + ' ' + auth.user.last_name
> > auth.messages.logged_out='Logged out successfully, until next time
> > ' + auth.user.first_name + ' ' + auth.user.last_name
>
> > Kind regards,
>
> > Annet.