File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ function simplesamlphp_auth_init() {
230
230
231
231
// Retrieve user mapping and attempt to log the user in.
232
232
$ext_user = user_external_load($authname);
233
+ $skip_user_finalization = FALSE;
233
234
234
235
if (!$ext_user) {
235
236
// First we check the admin settings for simpleSAMLphp and find out if we are allowed to register users.
@@ -239,6 +240,7 @@ function simplesamlphp_auth_init() {
239
240
_simplesaml_auth_debug(t('Register [%authname]', array('%authname' => $authname)));
240
241
241
242
user_external_login_register($authname, 'simplesamlphp_auth');
243
+ $skip_user_finalization = TRUE;
242
244
243
245
if ($user) {
244
246
// Populate roles based on configuration setting.
@@ -282,9 +284,12 @@ function simplesamlphp_auth_init() {
282
284
283
285
}
284
286
285
- // Finalizing the login, calls hook_user op login.
287
+ // Finalizing the login, calls hook_user op login.
288
+ // user_external_login_register() calls this for us.
289
+ if (!$skip_user_finalization) {
286
290
$edit = array();
287
291
user_login_finalize($edit);
292
+ }
288
293
289
294
} // End if !empty authname.
290
295
} // End if isset saml_session.
You can’t perform that action at this time.
0 commit comments