Trying to do some role cleanup and other user actions at login. Seems best to do this via Rules and avoid bloating this module.
Pretty simple to just invoke a Rules event for login and register.

There's also an indent problem fix in here.

Comments

doublejosh’s picture

Liking this route.

doublejosh’s picture

Title: Add Rules invoke to login. » Add Rules action integration for register & login
doublejosh’s picture

Title: Add Rules action integration for register & login » Add Rules integration for register & login
doublejosh’s picture

Just ignore that patch :)
Here is adding the actions with an inc file and triggering the events in the module.

doublejosh’s picture

Status: Active » Needs review

Testing went well with this.

doublejosh’s picture

Status: Needs review » Reviewed & tested by the community
geekwisdom’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Added with small tweaks to the 7.x-2.x branch
See: http://drupalcode.org/project/simplesamlphp_auth.git/commit/0c4279ced0c7...

doublejosh’s picture

Status: Closed (fixed) » Fixed

Possible useful spot.

...
        // Retrieve user mapping and attempt to log the user in.
        $ext_user = user_external_load($authname);

        if (module_exists('rules')) {
          rules_invoke_event('simplesamlphp_auth_rules_event_extlogin', $authname);
        }
...

I need to insert an authmap entry in one circumstance.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

typo