Revize 1749
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/trunk/kohana/application/controllers/users.php | ||
---|---|---|
if (!$user_model || !$user_model->id)
|
||
Controller::error(RECORD);
|
||
|
||
// cannot delete main user (fixes #384)
|
||
if ($user_model->id == User_Model::ASSOCIATION)
|
||
Controller::warning(PARAMETER);
|
||
|
||
$member_id = $user_model->member_id;
|
||
|
||
// access rights
|
freenetis/trunk/kohana/application/controllers/members.php | ||
---|---|---|
}
|
||
|
||
// delete user
|
||
$member->user->delete_depends_items($member->user->id);
|
||
$member->user->delete();
|
||
foreach ($member->users as $user)
|
||
{
|
||
$user->delete_depends_items($user->id);
|
||
$user->delete();
|
||
}
|
||
|
||
// delete account
|
||
$member->delete_accounts($member->id);
|
Také k dispozici: Unified diff
Oprava:
- fixes #384: chraneny ucet admina
- fixes #383: mazani applikanta smaze uzivatele s ID 1