Method: MailserviceController#admin_user_delete

Defined in:
app/controllers/mailservice_controller.rb

#admin_user_delete(login, login_confirmation) ⇒ Object

Deletes a user.



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'app/controllers/mailservice_controller.rb', line 198

def admin_user_delete , 
    user_admin?

    if  !=  then
        raise "Login and login confirmation not the same"
    end
    if User.find(session[:user_id]). ==  then
        raise "Trying to delete yourself? Very funny"
    end
      
    u=User. 
    if u then
        User.delete u.id
        return true
    else
        return false
    end
end