private function check_password($login, $password) { $find = admins::model()->findBySql("SELECT ID,Login,Password FROM admins WHERE Login='******'"); if ($find) { if ($this->admin_encoding($password) == $find->Password) { return true; } else { return false; } } else { return false; } }