diff --git a/shibboleth_drupalauth.module b/shibboleth_drupalauth.module
index 10fa3b5..ee98205 100644
--- a/shibboleth_drupalauth.module
+++ b/shibboleth_drupalauth.module
@@ -173,11 +173,20 @@ 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;
+      }
+
+      if (!empty($userdata)) {
+        return array(TRUE, $userdata, $result['hostname']);
       }
-      return array(TRUE, $userdata, $result['hostname']);
     }
   }
   return FALSE;
@@ -206,9 +215,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;
 }
