Projet

Général

Profil

Development #14070

possibility for a plugin to run code on user logging in

Ajouté par Frédéric Péters il y a plus de 7 ans. Mis à jour il y a environ 7 ans.

Statut:
Rejeté
Priorité:
Haut
Assigné à:
-
Catégorie:
-
Version cible:
-
Début:
24 novembre 2016
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:

Description

The idea is to call some webservice to update user information (from the belgian national register) whenever they log in.

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 7 ans

Would authentic2.utils.login() be a good placement for this callback ?

Yes, this looks like something that should be at the same level as record_authentication_event.

#2

Mis à jour par Frédéric Péters il y a plus de 7 ans

  • Priorité changé de Normal à Haut

(change of priority because I need it for Liege but I can probably do the patch by myself)

#3

Mis à jour par Benjamin Dauvergne il y a plus de 7 ans

On each login the generic signal from Django is also called (django.contrib.auth.signals.user_logged_in), you could connect your code to this signal from the ready() method of the AppConfig object of your plugin.

#4

Mis à jour par Frédéric Péters il y a environ 7 ans

  • Statut changé de Nouveau à Rejeté

This works fine with the existing signal; thanks.

Formats disponibles : Atom PDF