mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fix $query after user was created
This commit is contained in:
@@ -64,11 +64,19 @@ class Header_auth extends CI_Controller {
|
||||
// Config check if create user
|
||||
if ($this->config->item('auth_header_create')) {
|
||||
$this->_create_user($username, $email, $callsign, $firstname, $lastname);
|
||||
$query = $this->user_model->get($username);
|
||||
} else {
|
||||
$this->_sso_error(__("User not found."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$query || $query->num_rows() !== 1) {
|
||||
log_message('error', 'SSO Authentication: User could not be found or created.');
|
||||
$this->_sso_error();
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $query->row();
|
||||
|
||||
// Prevent clubstation direct login via header (mirrors User::login)
|
||||
|
||||
Reference in New Issue
Block a user