PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/user_delete.php

https://github.com/radicaldesigns/jaguar
PHP | 14 lines | 12 code | 2 blank | 0 comment | 2 complexity | 12a7accf487bd6503c004e466de09613 MD5 | raw file
Possible License(s): MIT, LGPL-2.1
  1. <?php
  2. require_once('boot.php');
  3. if(!empty($_POST['user_id'])){
  4. $delete_user = new User($_POST['user_id']);
  5. $delete_user->set(array('id'=>$_POST['user_id']));
  6. trigger_error($delete_user->id);
  7. if($delete_user->deleteData($_POST['user_id'])){
  8. header("Location: user_list.php");
  9. exit();
  10. }
  11. }
  12. bail('failed to delete user');