Revize 60
Přidáno uživatelem kenod před více než 16 roky(ů)
freenetis/trunk/kohana/application/controllers/login.php | ||
---|---|---|
{
|
||
$this->session->set('username', $this->input->post('username'));
|
||
$this->session->set('user_id', $user_id);
|
||
$user_model->clear();
|
||
$user_model->find($user_id);
|
||
$member_id = $user_model->member_id;
|
||
$user_type = $user_model->type;
|
||
$this->session->set('member_id', $user_model->member_id);
|
||
$user_model->clear();
|
||
$user_model->where('member_id='.$member_id.' AND type!=\'user\'')->find();
|
||
$this->session->set('member_login', $user_model->login);
|
||
|
||
url::redirect(url_lang::base().'devices', 'redirect');
|
||
if ($user_type!='user') url::redirect(url_lang::base().'members/show/'.$member_id, 'redirect');
|
||
else url::redirect(url_lang::base().'users/show/'.$user_id, 'redirect');
|
||
die();
|
||
}
|
||
else $error = url_lang::lang('texts.username or password do not match');
|
Také k dispozici: Unified diff