def save_ldap_user(user, &block)
      Fiber.new do
        if user.nil?
          block.call
        elsif found = find_user(user.jid)
          block.call(found)
        else
          save_user(user)
          block.call(user)
        end
      end.resume
    end
def save_ldap_user(user, &block)
      Fiber.new do
        if user.nil?
          block.call
        elsif found = find_user(user.jid)
          block.call(found)
        else
          save_user(user)
          block.call(user)
        end
      end.resume
    end
Save missing users to the storage database after they're authenticated
 with LDAP. This allows admins to define users once in LDAP and have them
 sync to the chat database the first time they successfully sign in.

 user  - The User to persist, possibly nil.
 block - The block that receives the saved User, possibly nil.

 Returns nothing.