       return callback createKodingError "It's not allowed to delete this user!"
 
     # only owner and the dummy admins can delete a user
-    unless toBeDeletedUsername is delegate.profile.nickname or
+    unless toBeDeletedUsername is nickname or
            delegate.can 'administer accounts'
       return callback createKodingError "You must confirm this action!"
 

      if user.blockedUntil and user.blockedUntil > new Date
        toDate = user.blockedUntil.toUTCString()
        message = """
Account suspended due to violation of our acceptable use policy.

Hello,
This account has been put on suspension by Koding moderators due to a violation of our acceptable use policy. The ban will be in effect until #{toDate} at which time you will be able to log back in again. Should you have any questions regarding this ban, please write to ban@koding.com and allow 2-3 business days for us to research and reply. Even though your account is banned, all your data is safe and will be accessible once the ban lifts.

Please note, repeated violations of our acceptable use policy will result in the permanent deletion of your account.

Team Koding
          """
        callback createKodingError message
      else
        user.unblock callback

      guestsGroup.removeMember account, callback

  @convert = secure (client, userFormData, callback) ->

    { connection, sessionToken : clientId, clientIP } = client
    { delegate : account } = connection
    { nickname : oldUsername } = account.profile
