code: def user_structure(user, site):
      
      full_name = user.get_full_name().split()
      first_name = full_name[0]
      try:
          last_name = full_name[1]
      except IndexError:
          last_name = ''
      return {'userid': user.pk,
              'email': user.email,
              'nickname': user.get_username(),
              'lastname': last_name,
              'firstname': first_name,
              'url': '%s://%s%s' % (
                  PROTOCOL, site.domain,
                  user.get_absolute_url())}
docs: An user structure.