Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3308968
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:35:04+00:00 2026-05-17T21:35:04+00:00

In my installation the users login with Shibboleth [1], but the rule [2] I’ve

  • 0

In my installation the users login with Shibboleth [1], but the rule [2] I’ve set up to be executed on “User has logged in” event, isn’t executed.

On the other hand, when I login as administrator through the normal Drupal way, the rule is executed.

Does this mean that the external login event isn’t handled at all?

Is there a way to overcome this?

[1] http://drupal.org/project/shib_auth

[2] http://drupal.org/project/rules

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:35:04+00:00Added an answer on May 17, 2026 at 9:35 pm

    This seems to be a bug of the Shibboleth module, so the login ‘event’ is indeed not raised by it (in Drupal terms, it does not invoke hook_user() with $op = 'login').

    Looking at the Shibboleth code, the login seems to happen in its hook_init() implementation:

    /**
    * Create a new user based on informations from the Shibboleth handler if it's necessary or log in.
    */
    function shib_auth_init() {
      global $user;
    
      $unameVar = variable_get('shib_auth_username_variable', 'REMOTE_USER');
      $umailVar = variable_get('shib_auth_username_email', 'HTTP_SHIB_MAIL');
    
      // If
      // - The user isn't logged in
      // - There is Shibboleth authentication in the background
      // - The settings are fine and there has been a valid username setted up
      // - The settings are fine and there has been a valid user email address setted up
      if (!$user->uid && $_SERVER['HTTP_SHIB_IDENTITY_PROVIDER']) {
        if ($_SERVER[$unameVar] && $_SERVER[$umailVar]) {
          user_external_login_register($_SERVER[$unameVar], "shib_auth");
        }
        else {
          drupal_set_message(t("Username or e-mail address is missing. Maybe the Shibboleth configuration is not perfect."),"error");
        }
      }
      if ($user->uid && $_SERVER['HTTP_SHIB_IDENTITY_PROVIDER']) {
        $account = user_save($user,array('mail' => $_SERVER[$umailVar]));
        // Terminate if an error occured during user_save().
        if (!$account) {
          drupal_set_message(t("Error saving user account."), 'error');
          return;
        }
        $user = $account;
      }
    } // function shib_auth_init()
    

    So you’d need to patch this and and ensure that user_module_invoke() is called. The standard way to do this would be to call user_authenticate_finalize() after a successful login (which will in turn call user_module_invoke()), so you’d add that after the user_external_login_register() call:

        [...]
        if ($_SERVER[$unameVar] && $_SERVER[$umailVar]) {
          user_external_login_register($_SERVER[$unameVar], "shib_auth");
          // Do we have a logged in user now?
          if ($user->uid) {
            // Yes, ensure watchdog logging and proper invocation of hook_user
            // NOTE: We pass an empty array, as no form submit was involved here,
            // but we could also pass an array with 'unameVar' and 'umailVar',
            // as they would be the closest substitute.
            user_authenticate_finalize(array());
          }
        }
        [...]
    

    NOTE: Untested code, beware of typos and other stupid oversights 😉

    Should you end up doing this, you might want to submit it as a patch to the bug report linked above. (only if it works, obviously 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed MySql5.5 and set password during installation but when I try to use
I have a multi-user eclipse (3.4) installation with a shared master configuration area. Users
I'd like users to be able to reconfigure their installation (turn components on/off) by
Question is very simple: I cannot install RVM (single-user installation), as if I follow
I am trying to delete an old user from our perforce installation. A previous
I wonder if one can let the user specify an installation directory for an
1)how can i find out the Windows Installation drive in which the user is
As part of my WiX-based installation, I need to ask the user to enter
Strange.. with my installation of the Zend Framework <?php echo $this->user; ?> works fine
My installation of XCode 3.2 has begun to exhibit some strange behaviour. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.