mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 邮件地址/呼号';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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'] = 'Емэйл/позывной';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -63,13 +63,12 @@
|
||||
<div class="mb-3">
|
||||
<label><?php echo lang('account_password'); ?></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="password" name="user_password" />
|
||||
<input class="form-control" type="password" name="user_password" value="<?php if(isset($user_password)) { echo $user_password; } ?>" />
|
||||
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
|
||||
</div>
|
||||
<?php if(isset($password_error)) {
|
||||
echo "<small class=\"badge bg-danger\">".$password_error."</small>";
|
||||
} else if (!isset($user_add)) { ?>
|
||||
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +80,7 @@
|
||||
<?php
|
||||
$levels = $this->config->item('auth_level');
|
||||
foreach ($levels as $key => $value) {
|
||||
echo '<option value="'. $key . '" '. (($user_type == $key)?"selected=\"selected\"":""). '>' . $value . '</option>';
|
||||
echo '<option value="'. $key . '" '. (($user_type ?? '') == $key ? "selected=\"selected\"":""). '>' . $value . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -708,13 +707,12 @@
|
||||
<div class="mb-3">
|
||||
<label><?php echo lang('account_logbook_of_the_world_lotw_password'); ?></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="password" name="user_lotw_password" />
|
||||
<input class="form-control" type="password" name="user_lotw_password" value="<?php if(isset($user_lotw_password)) { echo $user_lotw_password; } ?>" />
|
||||
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
|
||||
</div>
|
||||
<?php if(isset($lotwpassword_error)) {
|
||||
echo "<small class=\"badge bg-danger\">".$lotwpassword_error."</small>";
|
||||
} else if (!isset($user_add)) { ?>
|
||||
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -735,13 +733,12 @@
|
||||
<div class="mb-3">
|
||||
<label><?php echo lang('account_eqslcc_password'); ?></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="password" name="user_eqsl_password" />
|
||||
<input class="form-control" type="password" name="user_eqsl_password" value="<?php if(isset($user_eqsl_password)) { echo $user_eqsl_password; } ?>" />
|
||||
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
|
||||
</div>
|
||||
<?php if(isset($eqslpassword_error)) {
|
||||
echo "<small class=\"badge bg-danger\">".$eqslpassword_error."</small>";
|
||||
} else if (!isset($user_add)) { ?>
|
||||
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -763,13 +760,12 @@
|
||||
<div class="mb-3">
|
||||
<label><?php echo lang('account_clublog_password'); ?></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="password" name="user_clublog_password" />
|
||||
<input class="form-control" type="password" name="user_clublog_password" value="<?php if(isset($user_clublog_password)) { echo $user_clublog_password; } ?>" />
|
||||
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
|
||||
</div>
|
||||
<?php if(isset($clublogpassword_error)) {
|
||||
echo "<small class=\"badge bg-danger\">".$clublogpassword_error."</small>";
|
||||
} else if (!isset($user_add)) { ?>
|
||||
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user