diff --git a/shibboleth_drupalauth.module b/shibboleth_drupalauth.module
index 10fa3b5..0ac886c 100644
--- a/shibboleth_drupalauth.module
+++ b/shibboleth_drupalauth.module
@@ -173,9 +173,15 @@ function shibboleth_drupalauth_validate($token) {
           $userdata = $address[0];
           break;
         case 'username':
-        default:
           $userdata = $user->name;
           break;
+        default:
+          // Implementing hook should return NULL if they didn't declare the datatype
+          $validate_data = module_invoke_all('shibboleth_drupalauth_validate', $datatype, $user);
+          if (!empty($validate_data[0])) {
+            $userdata = $validate_data[0];
+          }
+          break;
       }
       return array(TRUE, $userdata, $result['hostname']);
     }
@@ -206,9 +212,17 @@ function _shibboleth_drupalauth_gen_token($uid, $mail, $sid = '', $ssid = '') {
  * Data options available
  */
 function _shibboleth_drupalauth_data_options() {
-  return array(
+  $options = array(
     'username' => t('Login Username'),
     'email'    => t('Email Address'),
     'emailuser' => t('The username portion of the email address'),
   );
+  $extended_options = module_invoke_all('shibboleth_drupalauth_data_options');
+
+  if (!empty($extended_options)) {
+    $options += $extended_options;
+  }
+
+  asort($options);
+  return $options;
 }
