handle when password field not in UI

This commit is contained in:
HadleySo
2026-03-18 17:21:41 -05:00
parent 926b4f47f1
commit 012587e479
2 changed files with 2 additions and 2 deletions

View File

@@ -971,7 +971,7 @@ class User extends CI_Controller {
$post_data = $this->input->post(); $post_data = $this->input->post();
if (!empty($query->row()->external_account)) { if (!empty($query->row()->external_account)) {
$post_data['user_name'] = $query->row()->user_name; $post_data['user_name'] = $query->row()->user_name;
if (!($this->config->item('auth_header_allow_direct_login') ?? true)) { if (!($this->config->item('auth_header_allow_direct_login', 'sso') ?? true)) {
$post_data['user_password'] = $this->pwd_placeholder; // placeholder → model skips password update $post_data['user_password'] = $this->pwd_placeholder; // placeholder → model skips password update
} }
} }

View File

@@ -442,7 +442,7 @@ class User_Model extends CI_Model {
$pwd_placeholder = '**********'; $pwd_placeholder = '**********';
// Hash password // Hash password
if($fields['user_password'] != NULL) if(array_key_exists('user_password', $fields) && ($fields['user_password'] != NULL))
{ {
if (!file_exists('.demo') || (file_exists('.demo') && $this->session->userdata('user_type') == 99)) { if (!file_exists('.demo') || (file_exists('.demo') && $this->session->userdata('user_type') == 99)) {