diff --git a/application/controllers/User.php b/application/controllers/User.php index c344ca598..2ca5bcad9 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -149,7 +149,14 @@ class User extends CI_Controller { $this->input->post('user_wwff_to_qso_tab'), $this->input->post('user_pota_to_qso_tab'), $this->input->post('user_sig_to_qso_tab'), - $this->input->post('user_dok_to_qso_tab') + $this->input->post('user_dok_to_qso_tab'), + $this->input->post('user_lotw_name'), + $this->input->post('user_lotw_password'), + $this->input->post('user_eqsl_name'), + $this->input->post('user_eqsl_password'), + $this->input->post('user_clublog_name'), + $this->input->post('user_clublog_password'), + $this->input->post('user_winkey') )) { // Check for errors case EUSERNAMEEXISTS: @@ -227,6 +234,7 @@ class User extends CI_Controller { $query = $this->user_model->get_by_id($this->uri->segment(3)); $data['existing_languages'] = $this->find(); + $pwd_placeholder = '**********'; $this->load->model('bands'); $this->load->library('form_validation'); @@ -275,7 +283,11 @@ class User extends CI_Controller { if($this->input->post('user_password', true)) { $data['user_password'] = $this->input->post('user_password',true); } else { - $data['user_password'] = $q->user_password; + if ($q->user_password !== '' && $q->user_password !== null) { + $data['user_password'] = $pwd_placeholder; + } else { + $data['user_password'] = ''; + } } if($this->input->post('user_type', true)) { @@ -341,13 +353,21 @@ class User extends CI_Controller { if($this->input->post('user_clublog_password')) { $data['user_clublog_password'] = $this->input->post('user_clublog_password', true); } else { - $data['user_clublog_password'] = $q->user_clublog_password; + if ($q->user_clublog_password !== '' && $q->user_clublog_password !== null) { + $data['user_clublog_password'] = $pwd_placeholder; + } else { + $data['user_clublog_password'] = ''; + } } if($this->input->post('user_lotw_password')) { $data['user_lotw_password'] = $this->input->post('user_lotw_password', true); } else { - $data['user_lotw_password'] = $q->user_lotw_password; + if ($q->user_lotw_password !== '' && $q->user_lotw_password !== null) { + $data['user_lotw_password'] = $pwd_placeholder; + } else { + $data['user_lotw_password'] = ''; + } } if($this->input->post('user_eqsl_name')) { @@ -359,7 +379,11 @@ class User extends CI_Controller { if($this->input->post('user_eqsl_password')) { $data['user_eqsl_password'] = $this->input->post('user_eqsl_password', true); } else { - $data['user_eqsl_password'] = $q->user_eqsl_password; + if ($q->user_eqsl_password !== '' && $q->user_eqsl_password !== null) { + $data['user_eqsl_password'] = $pwd_placeholder; + } else { + $data['user_eqsl_password'] = ''; + } } if($this->input->post('user_measurement_base')) { @@ -510,7 +534,7 @@ class User extends CI_Controller { if($this->input->post('user_hamsat_key', true)) { $data['user_hamsat_key'] = $this->input->post('user_hamsat_key', true); } else { - $hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'))->result(); + $hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'api'), $this->uri->segment(3))->result(); if (count($hkey_opt)>0) { $data['user_hamsat_key'] = $hkey_opt[0]->option_value; } else { @@ -521,7 +545,7 @@ class User extends CI_Controller { if($this->input->post('user_hamsat_workable_only')) { $data['user_hamsat_workable_only'] = $this->input->post('user_hamsat_workable_only', false); } else { - $hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'))->result(); + $hkey_opt=$this->user_options_model->get_options('hamsat',array('option_name'=>'hamsat_key','option_key'=>'workable'), $this->uri->segment(3))->result(); if (count($hkey_opt)>0) { $data['user_hamsat_workable_only'] = $hkey_opt[0]->option_value; } @@ -530,7 +554,7 @@ class User extends CI_Controller { if($this->input->post('user_iota_to_qso_tab')) { $data['user_iota_to_qso_tab'] = $this->input->post('user_iota_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'iota','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'iota','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_iota_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -539,7 +563,7 @@ class User extends CI_Controller { if($this->input->post('user_sota_to_qso_tab')) { $data['user_sota_to_qso_tab'] = $this->input->post('user_sota_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sota','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sota','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_sota_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -548,7 +572,7 @@ class User extends CI_Controller { if($this->input->post('user_wwff_to_qso_tab')) { $data['user_wwff_to_qso_tab'] = $this->input->post('user_wwff_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'wwff','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'wwff','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_wwff_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -557,7 +581,7 @@ class User extends CI_Controller { if($this->input->post('user_pota_to_qso_tab')) { $data['user_pota_to_qso_tab'] = $this->input->post('user_pota_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'pota','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'pota','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_pota_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -566,7 +590,7 @@ class User extends CI_Controller { if($this->input->post('user_sig_to_qso_tab')) { $data['user_sig_to_qso_tab'] = $this->input->post('user_sig_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sig','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'sig','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_sig_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -575,7 +599,7 @@ class User extends CI_Controller { if($this->input->post('user_dok_to_qso_tab')) { $data['user_dok_to_qso_tab'] = $this->input->post('user_dok_to_qso_tab', false); } else { - $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'dok','option_key'=>'show'))->result(); + $qkey_opt=$this->user_options_model->get_options('qso_tab',array('option_name'=>'dok','option_key'=>'show'), $this->uri->segment(3))->result(); if (count($qkey_opt)>0) { $data['user_dok_to_qso_tab'] = $qkey_opt[0]->option_value; } @@ -612,8 +636,8 @@ class User extends CI_Controller { 'qso'=>array('fas fa-broadcast-tower', 'fas fa-user', 'fas fa-dot-circle' ), 'qsoconfirm'=>array('0', 'fas fa-broadcast-tower', 'fas fa-user', 'fas fa-dot-circle', 'fas fa-check-circle' )); - $data['user_locations_quickswitch'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'locations_quickswitch'))->row()->option_value ?? 'false'); - $data['user_utc_headermenu'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'utc_headermenu'))->row()->option_value ?? 'false'); + $data['user_locations_quickswitch'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'locations_quickswitch'), $this->uri->segment(3))->row()->option_value ?? 'false'); + $data['user_utc_headermenu'] = ($this->user_options_model->get_options('header_menu', array('option_name'=>'utc_headermenu'), $this->uri->segment(3))->row()->option_value ?? 'false'); $this->load->view('interface_assets/header', $data); $this->load->view('user/edit', $data); diff --git a/application/language/bulgarian/account_lang.php b/application/language/bulgarian/account_lang.php index 7543b566c..a95925125 100644 --- a/application/language/bulgarian/account_lang.php +++ b/application/language/bulgarian/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/chinese_simplified/account_lang.php b/application/language/chinese_simplified/account_lang.php index 5884a1cf8..91056caad 100644 --- a/application/language/chinese_simplified/account_lang.php +++ b/application/language/chinese_simplified/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = '上传卫星状态到'; $lang['account_logbook_of_the_world'] = 'Logbook of the World(LoTW)'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) 用户名'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) 密码'; -$lang['account_leave_blank_to_keep_existing_password'] = '留空以保留现有密码'; $lang['account_clublog'] = 'Clublog'; $lang['account_clublog_email_callsign'] = 'Clublog 邮件地址/呼号'; diff --git a/application/language/czech/account_lang.php b/application/language/czech/account_lang.php index 5ac22ac49..a816dadfd 100644 --- a/application/language/czech/account_lang.php +++ b/application/language/czech/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Nahrávání stavu SAT QSOs na' $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Přihlašovací jméno Logbook of The World (LoTW)'; $lang['account_logbook_of_the_world_lotw_password'] = 'Heslo Logbook of The World (LoTW)'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Ponechte prázdné, pokud chcete zachovat stávající heslo'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Email nebo značka volacího znaku Club Logu'; diff --git a/application/language/dutch/account_lang.php b/application/language/dutch/account_lang.php index 955e00c93..ef2d9d3b9 100644 --- a/application/language/dutch/account_lang.php +++ b/application/language/dutch/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/english/account_lang.php b/application/language/english/account_lang.php index e1a1543e4..ee38d4384 100644 --- a/application/language/english/account_lang.php +++ b/application/language/english/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/finnish/account_lang.php b/application/language/finnish/account_lang.php index cfa9bfe54..931993338 100644 --- a/application/language/finnish/account_lang.php +++ b/application/language/finnish/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Käyttäjänimi'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Salasana'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Jätä tyhjäksi säilyttääksesi tietokannan nykyisen salasanan'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Sähköposti/Kutsu'; diff --git a/application/language/french/account_lang.php b/application/language/french/account_lang.php index d6d50ccd5..2eb5ac9e1 100644 --- a/application/language/french/account_lang.php +++ b/application/language/french/account_lang.php @@ -73,7 +73,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = "Envoi des statuts des QSO par S $lang['account_logbook_of_the_world'] = "Logbook of the World"; $lang['account_logbook_of_the_world_lotw_username'] = "Utilisateur"; $lang['account_logbook_of_the_world_lotw_password'] = "Mot de passe"; -$lang['account_leave_blank_to_keep_existing_password'] = "(Laisser vide pour conserver le mot de passe existant)"; $lang['account_clublog'] = "Club Log"; $lang['account_clublog_email_callsign'] = "Email/Callsign"; diff --git a/application/language/german/account_lang.php b/application/language/german/account_lang.php index 9cec4eeb5..17c7d3ef8 100644 --- a/application/language/german/account_lang.php +++ b/application/language/german/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Status von SAT QSOs hochladen a $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Benutzername'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Passwort'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leer lassen um das existierende Passwort zu übernehmen'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Rufzeichen'; diff --git a/application/language/greek/account_lang.php b/application/language/greek/account_lang.php index 00158661b..1b1d89f66 100644 --- a/application/language/greek/account_lang.php +++ b/application/language/greek/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/italian/account_lang.php b/application/language/italian/account_lang.php index 1137c86db..38d9cfd18 100644 --- a/application/language/italian/account_lang.php +++ b/application/language/italian/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/polish/account_lang.php b/application/language/polish/account_lang.php index 23ed747aa..02ba7fb1f 100644 --- a/application/language/polish/account_lang.php +++ b/application/language/polish/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/russian/account_lang.php b/application/language/russian/account_lang.php index 224fead36..72d46dc85 100644 --- a/application/language/russian/account_lang.php +++ b/application/language/russian/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Загружать статус $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Логин'; $lang['account_logbook_of_the_world_lotw_password'] = 'Пароль'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Оставьте пустым для сохранения текущего пароля'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Емэйл/позывной'; diff --git a/application/language/spanish/account_lang.php b/application/language/spanish/account_lang.php index f9f6178ea..e0afbe24d 100644 --- a/application/language/spanish/account_lang.php +++ b/application/language/spanish/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Subir los estados de QSOs de SA $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Nombre de Usuario Logbook of The World (LoTW)'; $lang['account_logbook_of_the_world_lotw_password'] = 'Contraseña Logbook of The World (LoTW)'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Deje la contraseña en blanco para mantener la contraseña actual'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Correo/Indicativo de Club Log'; diff --git a/application/language/swedish/account_lang.php b/application/language/swedish/account_lang.php index eb77aa2d3..51f95b8d9 100644 --- a/application/language/swedish/account_lang.php +++ b/application/language/swedish/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Ladda upp status för SAT QSOs $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Användarnamn'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Lösenord'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Lämna tomt om du vill behålla befintligt lösenord'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/language/turkish/account_lang.php b/application/language/turkish/account_lang.php index 8b250f043..84084966d 100644 --- a/application/language/turkish/account_lang.php +++ b/application/language/turkish/account_lang.php @@ -75,7 +75,6 @@ $lang['account_upload_status_of_sat_qsos_to'] = 'Upload status of SAT QSOs to'; $lang['account_logbook_of_the_world'] = 'Logbook of the World'; $lang['account_logbook_of_the_world_lotw_username'] = 'Logbook of The World (LoTW) Username'; $lang['account_logbook_of_the_world_lotw_password'] = 'Logbook of The World (LoTW) Password'; -$lang['account_leave_blank_to_keep_existing_password'] = 'Leave blank to keep existing password'; $lang['account_clublog'] = 'Club Log'; $lang['account_clublog_email_callsign'] = 'Club Log Email/Callsign'; diff --git a/application/models/User_model.php b/application/models/User_model.php index cd29c6e20..6d01343c3 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -151,7 +151,9 @@ class User_Model extends CI_Model { $user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url, $user_default_band, $user_default_confirmation, $user_qso_end_times, $user_quicklog, $user_quicklog_enter, $language, $user_hamsat_key, $user_hamsat_workable_only, $user_iota_to_qso_tab, $user_sota_to_qso_tab, - $user_wwff_to_qso_tab, $user_pota_to_qso_tab, $user_sig_to_qso_tab, $user_dok_to_qso_tab) { + $user_wwff_to_qso_tab, $user_pota_to_qso_tab, $user_sig_to_qso_tab, $user_dok_to_qso_tab, + $user_lotw_name, $user_lotw_password, $user_eqsl_name, $user_eqsl_password, $user_clublog_name, $user_clublog_password, + $user_winkey) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -186,7 +188,14 @@ class User_Model extends CI_Model { 'user_qso_end_times' => xss_clean($user_qso_end_times), 'user_quicklog' => xss_clean($user_quicklog), 'user_quicklog_enter' => xss_clean($user_quicklog_enter), - 'language' => xss_clean($language) + 'language' => xss_clean($language), + 'user_lotw_name' => xss_clean($user_lotw_name), + 'user_lotw_password' => xss_clean($user_lotw_password), + 'user_eqsl_name' => xss_clean($user_eqsl_name), + 'user_eqsl_password' => xss_clean($user_eqsl_password), + 'user_clublog_name' => xss_clean($user_clublog_name), + 'user_clublog_password' => xss_clean($user_clublog_password), + 'winkey' => xss_clean($user_winkey) ); // Check the password is valid @@ -291,28 +300,44 @@ class User_Model extends CI_Model { return EEMAILEXISTS; } + $pwd_placeholder = '**********'; + // Hash password if($fields['user_password'] != NULL) { - $data['user_password'] = $this->_hash($fields['user_password']); - if($data['user_password'] == EPASSWORDINVALID) { - return EPASSWORDINVALID; + if ($fields['user_password'] !== $pwd_placeholder) { + $data['user_password'] = $this->_hash($fields['user_password']); + if($data['user_password'] == EPASSWORDINVALID) { + return EPASSWORDINVALID; + } } } - if($fields['user_lotw_password'] != NULL) + if($fields['user_lotw_password'] != '') { - $data['user_lotw_password'] = $fields['user_lotw_password']; + if ($fields['user_lotw_password'] !== $pwd_placeholder) { + $data['user_lotw_password'] = $fields['user_lotw_password']; + } + } else { + $data['user_lotw_password'] = NULL; } - if($fields['user_clublog_password'] != NULL) + if($fields['user_clublog_password'] != '') { - $data['user_clublog_password'] = $fields['user_clublog_password']; + if ($fields['user_clublog_password'] !== $pwd_placeholder) { + $data['user_clublog_password'] = $fields['user_clublog_password']; + } + } else { + $data['user_clublog_password'] = NULL; } - if($fields['user_eqsl_password'] != NULL) + if($fields['user_eqsl_password'] != '') { - $data['user_eqsl_password'] = $fields['user_eqsl_password']; + if ($fields['user_eqsl_password'] !== $pwd_placeholder) { + $data['user_eqsl_password'] = $fields['user_eqsl_password']; + } + } else { + $data['user_eqsl_password'] = NULL; } // Update the user diff --git a/application/views/user/edit.php b/application/views/user/edit.php index e2647a90d..c5dbd7959 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -63,13 +63,12 @@