In simplesamlphp_auth_user_insert(), ln 166, it runs _simplesaml_auth_autoload and if that is successful, it immediately exists the hook, ignoring the account registration code that follows (most notably, populating the email address from the appropriate saml attribute). This is fixed by adding the !: if (!_simplesaml_auth_autoload()) {...
If this was actually by design, should the module instead be calling _simplesaml_auth_user_update() from within _simplesaml_auth_user_register()?

Comments

msound’s picture

Status: Active » Needs review
StatusFileSize
new475 bytes

@hart0554: You are right. I think the if condition should !_simplesaml_auth_autoload.

Patch attached.

Also fixed the case of missing email id mentioned in https://www.drupal.org/node/2357879 because the hook_user_insert actually executes now.

  • snufkin committed 2e810c1 on 7.x-3.x authored by msound
    Issue #2387463 by msound: hook_user_insert exiting prematurely
    
snufkin’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

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