diff --git a/simpleid/www/extensions/sreg/sreg.extension.php b/simpleid/www/extensions/sreg/sreg.extension.php
new file mode 100644
index 0000000..955d6f6
--- /dev/null
+++ b/simpleid/www/extensions/sreg/sreg.extension.php
@@ -0,0 +1,240 @@
+<?php
+/*
+ * SimpleID
+ *
+ * Copyright (C) Kelvin Mo 2007-8
+ *
+ * Includes code Drupal OpenID module (http://drupal.org/project/openid)
+ * Rowan Kerr <rowan@standardinteractive.com>
+ * James Walker <james@bryght.com>
+ *
+ * Copyright (C) Rowan Kerr and James Walker
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 
+ * $Id$
+ */
+
+/**
+ * Implements the Simple Registration extension.
+ * 
+ *
+ * @package simpleid
+ * @subpackage extensions
+ * @filesource
+ */
+ 
+/** Namespace for the Simple Registration extension */
+define('OPENID_NS_SREG', 'http://openid.net/extensions/sreg/1.1');
+
+/**
+ * @see hook_response()
+ */
+function sreg_response($assertion, $request) {
+    global $user;
+    global $version;
+    
+    // We only deal with positive assertions
+    if (!$assertion) return array();
+    
+    // We only respond if the extension is requested
+    if (!openid_extension_requested(OPENID_NS_SREG, $request)) return array();
+    
+    $request = openid_extension_filter_request(OPENID_NS_SREG, $request);
+    $required = (isset($request['required'])) ? explode(',', $request['required']) : array();
+    $optional = (isset($request['optional'])) ? explode(',', $request['optional']) : array();
+    $fields = array_merge($required, $optional);
+    $alias = openid_extension_alias(OPENID_NS_SREG);
+    $response = array();
+    
+    if ($version == OPENID_VERSION_2) $response['openid.ns.' . $alias] = OPENID_NS_SREG;
+    
+    foreach ($fields as $field) {
+        $value = _sreg_get_value($field);
+        
+        if ($value != NULL) $response['openid.' . $alias . '.' .  $field] = $value;
+    }
+    
+    return $response;
+}
+
+/**
+ * Returns an array of fields that need signing.
+ *
+ * @see hook_signed_fields()
+ */
+function sreg_signed_fields($response) {
+    // We only respond if the extension is requested
+    if (!openid_extension_requested(OPENID_NS_SREG, $response)) return array();
+    
+    $fields = array_keys(openid_extension_filter_request(OPENID_NS_SREG, $response));
+    $alias = openid_extension_alias(OPENID_NS_SREG);
+    $signed_fields = array();
+
+    if (isset($response['openid.ns.' . $alias])) $signed_fields[] = 'ns.' . $alias;
+    foreach ($fields as $field) {
+        if (isset($response['openid.' . $alias . '.' . $field])) $signed_fields[] = $alias . '.' . $field;
+    }
+    
+    return $signed_fields;
+}
+
+/**
+ * @see hook_consent_form()
+ */
+function sreg_consent_form($request, $response, $rp) {
+    global $user;
+    
+    // We only respond if the extension is requested
+    if (!openid_extension_requested(OPENID_NS_SREG, $request)) return '';
+    
+    $request = openid_extension_filter_request(OPENID_NS_SREG, $request);
+    $required = (isset($request['required'])) ? explode(',', $request['required']) : array();
+    $optional = (isset($request['optional'])) ? explode(',', $request['optional']) : array();
+    $fields = array_merge($required, $optional);
+    
+    if ((count($request)) && isset($user['sreg'])) {
+        $xtpl2 = new XTemplate('extensions/sreg/sreg.xtpl');
+        
+        $xtpl2->assign('alias', openid_extension_alias(OPENID_NS_SREG));
+        
+        if (isset($request['policy_url'])) {            
+            $xtpl2->assign('policy', t('You can view the site\'s policy in relation to the use of this information at this URL: <a href="@url">@url</a>.', array('@url' => $request['policy_url'])));            
+        }
+        
+        foreach ($fields as $field) {
+            $value = _sreg_get_value($field);
+        
+            if ($value != NULL) {
+                $xtpl2->assign('name', htmlspecialchars($field, ENT_QUOTES, 'UTF-8'));
+                $xtpl2->assign('value', htmlspecialchars($value, ENT_QUOTES, 'UTF-8'));
+                
+                $xtpl2->assign('checked', (in_array($field, $required) || !isset($rp['sreg_consents']) || in_array($field, $rp['sreg_consents'])) ? 'checked="checked"' : '');
+                $xtpl2->assign('disabled', (in_array($field, $required)) ? 'disabled="disabled"' : '');
+                if (in_array($field, $required)) $xtpl2->parse('form.sreg.required');
+                
+                $xtpl2->parse('form.sreg');
+            }
+        }
+        
+        $xtpl2->assign('sreg_data', t('SimpleID will also be sending the following registration information to the site.'));
+        $xtpl2->assign('name_label', t('Name'));
+        $xtpl2->assign('value_label', t('Value'));
+        
+        $xtpl2->parse('form');
+        return $xtpl2->text('form');
+    }
+}
+
+/**
+ * @see hook_consent()
+ */
+function sreg_consent($form_request, &$response, &$rp) {
+    // We only respond if the extension is requested
+    if (!openid_extension_requested(OPENID_NS_SREG, $response)) return;
+    
+    $fields = array_keys(openid_extension_filter_request(OPENID_NS_SREG, $response));
+    $alias = openid_extension_alias(OPENID_NS_SREG);
+    
+    foreach ($fields as $field) {
+        if (isset($response['openid.' . $alias . '.' . $field])) {
+            if (!in_array($field, $form_request['sreg_consents'])) {
+                unset($response['openid.' . $alias . '.' . $field]);
+            }
+        }
+    }
+    
+    if (count(array_keys(openid_extension_filter_request(OPENID_NS_SREG, $response))) == 0) {
+        // We have removed all the responses, so we remove the namespace as well
+        unset($response['openid.ns.' . $alias]);
+    }
+    
+    $rp['sreg_consents'] = $form_request['sreg_consents'];
+}
+
+/**
+ * @see hook_page_profile()
+ */
+function sreg_page_profile() {
+    global $user;
+    $xtpl2 = new XTemplate('extensions/sreg/sreg.xtpl');
+    
+    if (isset($user['sreg'])) {
+        foreach ($user['sreg'] as $name => $value) {
+            $xtpl2->assign('name', htmlspecialchars($name, ENT_QUOTES, 'UTF-8'));
+            $xtpl2->assign('value', htmlspecialchars($value, ENT_QUOTES, 'UTF-8'));
+            $xtpl2->parse('user_page.sreg');
+        }
+    }
+    
+    $xtpl2->assign('sreg_data', t('SimpleID will send the following information to sites which supports the Simple Registration Extension.'));
+    $xtpl2->assign('connect_data', t('If you have also supplied OpenID Connect user information in your identity file, these may also be sent as part of this Extension.'));
+    $xtpl2->assign('edit_identity_file', t('To change these, <a href="!url">edit your identity file</a>.', array('!url' => 'http://simpleid.org/docs/1/identity-files/')));
+    $xtpl2->assign('name_label', t('Name'));
+    $xtpl2->assign('value_label', t('Value'));
+    
+    $xtpl2->parse('user_page');
+    
+    return array(array(
+        'id' => 'sreg',
+        'title' => t('Simple Registration Extension'),
+        'content' => $xtpl2->text('user_page')
+    ));
+}
+
+
+/**
+ * Looks up the value of a specified Simple Registration Extension field.
+ *
+ * This function looks up the sreg section of the user's identity file.  If the
+ * specified field cannot be found, it looks up the corresponding field in the
+ * OpenID Connect user information (user_info section).
+ *
+ * @param string $field the field to look up
+ * @return string the value or NULL if not found
+ */
+function _sreg_get_value($field) {
+    global $user;
+    
+    if (isset($user['sreg'][$field])) {
+        return $user['sreg'][$field];
+    } else {
+        switch ($field) {
+            case 'nickname':
+            case 'email':
+                if (isset($user['user_info'][$field])) return $user['user_info'][$field];
+                break;
+            case 'fullname':
+                if (isset($user['user_info']['name'])) return $user['user_info']['name'];
+                break;
+            case 'timezone':
+                if (isset($user['user_info']['zoneinfo'])) return $user['user_info']['zoneinfo'];
+                break;
+            case 'gender':
+                if (isset($user['user_info']['gender'])) return strtoupper(substr($user['user_info']['gender'], 0, 1));
+                break;
+            case 'postcode':
+                if (isset($user['user_info']['address']['postal_code'])) return $user['user_info']['address']['postcal_code'];
+                break;
+            default:
+                return NULL;
+        } 
+        return NULL;
+    }
+}
+
+
+
+?>
diff --git a/simpleid/www/extensions/sreg/sreg.xtpl b/simpleid/www/extensions/sreg/sreg.xtpl
new file mode 100644
index 0000000..07550bb
--- /dev/null
+++ b/simpleid/www/extensions/sreg/sreg.xtpl
@@ -0,0 +1,40 @@
+<!-- BEGIN: user_page -->
+<!-- :mode=html: $Id$ -->
+    <p>{sreg_data}</p>
+    
+    <p>{connect_data}</p>
+    
+    <p>{edit_identity_file}</p>
+    
+    <table>
+        <tr>
+            <th>{name_label}</th>
+            <th>{value_label}</th>
+        </tr>
+        <!-- BEGIN: sreg -->
+        <tr>
+            <td>{name}</td>
+            <td>{value}</td>
+        </tr>
+        <!-- END: sreg -->
+    </table>
+<!-- END: user_page -->
+            
+<!-- BEGIN: form -->
+    <p>{sreg_data} {policy}</p>
+    
+    <table>
+        <tr>
+            <th></th>
+            <th>{name_label}</th>
+            <th>{value_label}</th>
+        </tr>
+        <!-- BEGIN: sreg -->
+        <tr>
+            <td><input name="sreg_consents[]" type="checkbox" value="{name}" id="sreg-consents-{name}" {checked} {disabled} /><!-- BEGIN: required --><input name="sreg_consents[]" type="hidden" value="{name}" /><!-- END: required --></td>
+            <td><input type="hidden" name="openid.{alias}.{name}" value="{value}" /><label for="sreg-consents-{name}">{name}</label></td>
+            <td>{value}</td>
+        </tr>
+        <!-- END: sreg -->
+    </table>
+<!-- END: form -->
