Revize c84c32de
Přidáno uživatelem Ondřej Fibich před více než 7 roky(ů)
application/models/user.php | ||
---|---|---|
* @param integer $user_id
|
||
*/
|
||
public function delete_depends_items($user_id)
|
||
{
|
||
{
|
||
$this->delete_watchers($user_id);
|
||
|
||
$this->db->query("
|
||
DELETE FROM devices
|
||
WHERE user_id = ?
|
||
... | ... | |
", $user_id);
|
||
}
|
||
|
||
/**
|
||
* Function searches for user watchers and delete them.
|
||
*
|
||
* @param integer $user_id
|
||
*/
|
||
public function delete_watchers($user_id)
|
||
{
|
||
$this->db->query("
|
||
DELETE FROM watchers
|
||
WHERE user_id = ?
|
||
", $user_id);
|
||
}
|
||
|
||
/**
|
||
* Selects all users emails
|
||
*
|
Také k dispozici: Unified diff
Fixes #1069: user with watcher can be deleted