+ email_hash = md5(str(salt)+reg_email).hexdigest()
+ user_request = {
+ 'first_name' : reg_fname,
+ 'last_name' : reg_lname,
+ 'organization' : reg_site_name,
+ 'authority_hrn' : reg_auth,
+ 'email' : reg_email,
+ 'password' : reg_password,
+ 'public_key' : public_key,
+ 'private_key' : private_key,
+ 'current_site' : current_site,
+ 'email_hash' : email_hash,
+ 'user_hrn' : user_hrn,
+ 'pi' : [reg_auth],
+ 'auth_type' : 'managed',
+ 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash
+ }
+
+
+ create_pending_user(request, user_request, user_detail)