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 auth.py

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

Any help will be appreciated!
Thanks

run_trigger('on_login') calls a method defined in hooks.py with the variable name on_login

hooks.py might look like

...

on_login = "erpnext.integrations.user.log_user"
...

Hello @netchampfaris

Thank you for the clarification.

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