Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29363

New event for eventhandler: user_login

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.4, 2.1.1
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE

      Description

      I would like to create an additional piece of code which is executed asynchronously whenever an user logs in.
      I want to be able to send the username of this user to a different system.
      But I don't want to edit the auth plugins which are provided by default.

      So what I'm asking for is the possibility to trigger user_login at/around the return of authenticate_user_login in /lib/moodlelib.php.
      My basic idea would be to add:
      events_trigger('user_login', $user);
      just before the
      return $user;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              sebsoft Sebastian Berm
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: