database/redis-client.js
function(userObj, setname, hashPrefix, cb){
      
      console.log("\nCreating new user account %s", userObj.network.username)
      
      /*
      userObj = {
        network: {
          type : 'facebook',
          first_name: 'Joe',
          last_name: 'McCann',
          username: 'joemccann',
          full_name: 'Joe McCann'
        },
        email_address: 'joseph.isaac@gmail.com',
        oauth: {}
      }
      */
      
      // TODO: CHECK IF HASH EXISTS

      // Schema should be:
      var schema = 
      {
        uuid: null,
        networks: { 
          twitter: {},
          facebook: {},
          instagram: {},
          flickr: {},
          dropbox: {},
          google_drive: {}
        },
        email_addresses: [],
        cache: {
          twitter: null,
          facebook: null,
          instagram: null,
          flickr: null,
          dropbox: null,
          google_drive: null
        }
      }

      // Generate unique user id
      schema.uuid = sha1(redisConfig.salt, userObj.email_address)

      // "Official" email address is schema.email_addresses[0]
      // Add it to the email addresses for the user
      schema.email_addresses.push(userObj.email_address)

      // Let's 
      client.sadd(setname, schema.uuid, function(e,d){

        if(cb){
          return cb(e,d)
        } 
        
        userSetAddHandler(e,d)

        client.hmset(hashPrefix +":"+schema.uuid, userObj, hmsetCb || userSetHashHandler)
        
      })

    }
function(userObj, setname, hashPrefix, cb){
      
      console.log("\nCreating new user account %s", userObj.network.username)
      
      /*
      userObj = {
        network: {
          type : 'facebook',
          first_name: 'Joe',
          last_name: 'McCann',
          username: 'joemccann',
          full_name: 'Joe McCann'
        },
        email_address: 'joseph.isaac@gmail.com',
        oauth: {}
      }
      */
      
      // TODO: CHECK IF HASH EXISTS

      // Schema should be:
      var schema = 
      {
        uuid: null,
        networks: { 
          twitter: {},
          facebook: {},
          instagram: {},
          flickr: {},
          dropbox: {},
          google_drive: {}
        },
        email_addresses: [],
        cache: {
          twitter: null,
          facebook: null,
          instagram: null,
          flickr: null,
          dropbox: null,
          google_drive: null
        }
      }

      // Generate unique user id
      schema.uuid = sha1(redisConfig.salt, userObj.email_address)

      // "Official" email address is schema.email_addresses[0]
      // Add it to the email addresses for the user
      schema.email_addresses.push(userObj.email_address)

      // Let's 
      client.sadd(setname, schema.uuid, function(e,d){

        if(cb){
          return cb(e,d)
        } 
        
        userSetAddHandler(e,d)

        client.hmset(hashPrefix +":"+schema.uuid, userObj, hmsetCb || userSetHashHandler)
        
      })

    }
function ( userObj , setname , hashPrefix , cb ) { console . log ( "\nCreating new user account %s" , userObj . network . username ) /*
      userObj = {
        network: {
          type : 'facebook',
          first_name: 'Joe',
          last_name: 'McCann',
          username: 'joemccann',
          full_name: 'Joe McCann'
        },
        email_address: 'joseph.isaac@gmail.com',
        oauth: {}
      }
      */ // TODO: CHECK IF HASH EXISTS // Schema should be: var schema = { uuid : null , networks : { twitter : { } , facebook : { } , instagram : { } , flickr : { } , dropbox : { } , google_drive : { } } , email_addresses : [ ] , cache : { twitter : null , facebook : null , instagram : null , flickr : null , dropbox : null , google_drive : null } } // Generate unique user id schema . uuid = sha1 ( redisConfig . salt , userObj . email_address ) // "Official" email address is schema.email_addresses[0] // Add it to the email addresses for the user schema . email_addresses . push ( userObj . email_address ) // Let's  client . sadd ( setname , schema . uuid , function ( e , d ) { if ( cb ) { return cb ( e , d ) } userSetAddHandler ( e , d ) client . hmset ( hashPrefix + ":" + schema . uuid , userObj , hmsetCb || userSetHashHandler ) } ) }
Create a new user account in Redis setname is the name of the set to add to hashPrefix is the prefix to identify the hash
Create a new user account in Redis setname is the name of the set to add to hashPrefix is the prefix to identify the hash