p_email=CFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_email,p_pw,req)orCFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_un,p_pw,req)## We try to login with either the email of the nickname
ifp_email:
p_email=p_email.lower()
else:
return([],p_email,p_pw,15)
exceptInvenioWebAccessExternalAuthError:
register_exception(alert_admin=True)
raise
ifp_email:# Authenthicated externally
query_result=run_sql("SELECT id from user where email=%s",(p_email,))