What steps will reproduce the problem? 1. define a function called execute_me_after_login:
def execute_me_after_login(form):
print 'Execute me please!'
define the login function in default.py:
def login():
from gluon.contrib.login_methods.auth20_account.py import OAuthAccount (or auth10a_account.py)
auth.settings.login_form=OAuthAccount(globals())
return dict(auth.login(onaccept=execute_me_after_login)) What is the expected output? What do you see instead? There is no output from execute_me_after_login() meaning the function is not executed. execute_me_after_login() is executed when using the regular form authentication. To be consistent, onaccept should work for other login methods. What version of the product are you using? On what operating system? 1.86.2, Linux Please provide any additional information below. None.
From firedrag...@gmail.com on February 18, 2011 02:53:28
What steps will reproduce the problem? 1. define a function called execute_me_after_login: def execute_me_after_login(form): print 'Execute me please!'
Original issue: http://code.google.com/p/web2py/issues/detail?id=196