@@ -367,9 +367,8 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
367
367
$account->name = _simplesamlphp_auth_get_default_name($account->uid);
368
368
}
369
369
catch (Exception $e) {
370
- $message = t('Username is missing.' . $e->getMessage());
371
- drupal_set_message(check_plain($message), "error");
372
- watchdog('simplesamlphp', $message, WATCHDOG_CRITICAL);
370
+ drupal_set_message(t('Your user name was not provided by your identity provider (IDP).'), "error");
371
+ watchdog('simplesamlphp_auth', $e->getMessage(), NULL, WATCHDOG_CRITICAL);
373
372
}
374
373
375
374
db_update('users')
@@ -385,7 +384,7 @@ function simplesamlphp_auth_user_insert(&$edit, $account, $category = NULL) {
385
384
}
386
385
catch (Exception $e) {
387
386
drupal_set_message(t('Your e-mail address was not provided by your identity provider (IDP).'), "error");
388
- watchdog('simplesamlphp_auth', $e->getMessage(), WATCHDOG_CRITICAL);
387
+ watchdog('simplesamlphp_auth', $e->getMessage(), NULL, WATCHDOG_CRITICAL);
389
388
}
390
389
391
390
if (!empty($mail_address)) {
@@ -745,7 +744,11 @@ function _simplesamlphp_auth_get_default_name($account) {
745
744
if ((!isset($_simplesamlphp_auth_saml_attributes[$auth_user_name_attr])) ||
746
745
(!isset($_simplesamlphp_auth_saml_attributes[$auth_user_name_attr][0])) ||
747
746
($_simplesamlphp_auth_saml_attributes[$auth_user_name_attr][0] == '')) {
748
- throw new Exception(t('There was no attribute named %auth_user_name_attr set for your user.', array('%auth_user_name_attr' => $auth_user_name_attr)));
747
+ throw new Exception(t('There was no set attribute named "%auth_user_name_attr" returned for user %uid.',
748
+ array(
749
+ '%auth_user_name_attr' => $auth_user_name_attr,
750
+ '%uid' => $account,
751
+ )));
749
752
}
750
753
$default_name = $_simplesamlphp_auth_saml_attributes[$auth_user_name_attr][0];
751
754
}
0 commit comments