 
     memberData = {}
     @fetchRolesByAccount member, (err, roles = []) ->
-      memberData.roles = roles  unless err
+      return callback { err, roles }  if err
+      memberData.roles = roles
       member.fetchEmail (err, email) ->
-        memberData.email = email  unless err
+        return callback { err, '' }  if err and not email
+        memberData.email = email
         memberData.username = member.data.profile.nickname
-        callback { memberData }
+        callback { '', memberData }
 
 
   @create = (client, groupData, owner, callback) ->


    @on 'MemberAdded', (member) ->
      @constructor.emit 'MemberAdded', { group: this, member }
      unless @slug is 'guests'

        @prepareNewlyAddedMember member, ({ memberData }) =>

          @sendNotification 'GroupJoined',
            actionType : 'groupJoined'
            actorType  : 'member'
            subject    : ObjectRef(this).data
            member     : ObjectRef(member).data
            memberData : memberData

    @on 'MemberRemoved', (member, requester) ->
      requester ?= member
      @constructor.emit 'MemberRemoved', { group: this, member, requester }
      unless @slug is 'guests'
        username = member.data.profile.nickname
        @sendNotification 'GroupLeft',
          actionType : 'groupLeft'
          actorType  : 'member'
          subject    : ObjectRef(this).data
          member     : ObjectRef(member).data
          username   : username

  @render        :
    loggedIn     :

async          = require 'async'
{ Module }     = require 'jraphical'
{ difference } = require 'underscore'
_ = require 'lodash'


module.exports = class JGroup extends Module
