You are here

function shib_auth_custom_mail in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 7.4 shib_auth.module \shib_auth_custom_mail()

User Data Customization function - MAIL This function handles the mail customization process @uname the username got from IdP @custom_uname the customized username @custom_mail the costumized e-mail address

1 call to shib_auth_custom_mail()
shib_auth_custom_form in ./shib_auth.module
If any customization or consent option is enabled, the custom form will show up before registering and forces the user to accept user consent and define username and/or e-mail address (prefilling fields with the data coming from the…

File

./shib_auth.module, line 418
Drupal Shibboleth authentication module.

Code

function shib_auth_custom_mail($uname, $custom_username, $custom_mail) {
  if (!valid_email_address($custom_mail)) {
    shib_auth_error('Please enter a valid e-mail address');
  }
  elseif (shib_auth_config('define_username') == 0) {

    // and email isn't used by another registered drupal user, save user
    shib_auth_save_authmap($uname, $uname, $custom_mail);
  }
  elseif (shib_auth_config('define_username') == 1 && isset($custom_username) && $custom_username) {
    shib_auth_custom_username($uname, $custom_username, $custom_mail);
  }
}