user deletion event, with vote deletion
This commit is contained in:
@ -40,6 +40,14 @@ class UserCreationEvent extends Event {
|
||||
}
|
||||
}
|
||||
|
||||
class UserDeletionEvent extends Event {
|
||||
var $id;
|
||||
|
||||
public function __construct($id) {
|
||||
$this->id = $id;
|
||||
}
|
||||
}
|
||||
|
||||
class UserCreationException extends SCoreException {}
|
||||
|
||||
class UserPage extends Extension {
|
||||
@ -511,6 +519,8 @@ class UserPage extends Extension {
|
||||
);
|
||||
}
|
||||
|
||||
send_event(new UserDeletionEvent($_POST['id']));
|
||||
|
||||
$database->execute(
|
||||
"DELETE FROM users WHERE id = :id",
|
||||
array("id" => $_POST['id'])
|
||||
|
Reference in New Issue
Block a user