         confirmation.send callback
 
   confirmEmail:(callback)-> @update {$set: status: 'confirmed'}, callback
-  block:(callback)-> @update {$set: status: 'blocked'}, callback
+
+  block:(blockedTo, callback)->
+    if blockedTo then return callback createKodingError "Blocking date is not defined"
+
+    @update
+      $set:
+        status: 'blocked',
+        blockedTo : blockedTo
+    , callback


  @whoami = secure ({connection:{delegate}}, callback)-> callback delegate

  @login = secure ({connection}, credentials, callback)->
    {username, password, clientId} = credentials
    constructor = @
    JUser.one {username, status: $ne: 'blocked'}, (err, user)->
      if err
        callback createKodingError err.message
      else unless user?

        email       : yes
      password      : String
      salt          : String
      blockedTo     : Date
      status        :
        type        : String
        enum        : [
