How run_trigger command works?

Hi All

Can somebody explain me how the ‘run_trigger()’ command working in frappe?
for example run_trigger('on_login') in

‘on_login’ may be a function. but where it should be defined?

Any help will be appreciated!

run_trigger('on_login') calls a method defined in with the variable name on_login might look like


on_login = "erpnext.integrations.user.log_user"

Hello @netchampfaris

Thank you for the clarification.

I can find in erpnext a variable like this, ‘on_logout’. But still i can’t find this ‘on_login’