From c7367844d234018aa3ae6456c3427befa76bb39d Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:01:10 +0100 Subject: [PATCH 01/12] admin passwort reset --- application/controllers/User.php | 78 ++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/application/controllers/User.php b/application/controllers/User.php index 50a04105..b6638da0 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -804,6 +804,84 @@ class User extends CI_Controller { } } + function admin_send_passwort_reset() { + + $this->load->model('user_model'); + if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + $query = $this->user_model->get_by_id($this->uri->segment(3)); + + $this->load->library('form_validation'); + + $this->form_validation->set_rules('id', 'user_id', 'required'); + + $data = $query->row(); + + if ($this->form_validation->run() != FALSE) + { + $this->session->set_flashdata('notice', 'Something went wrong! User has no user_id.'); + redirect('user'); + } + else + { + // Check email address exists + $this->load->model('user_model'); + + $check_email = $this->user_model->check_email_address($data->user_email); + + if($check_email == TRUE) { + // Generate password reset code 50 characters long + $this->load->helper('string'); + $reset_code = random_string('alnum', 50); + $user_first_name = $data->user_firstname; + $this->user_model->set_password_reset_code(($data->user_email), $reset_code); + + // Send email with reset code and first Name of the User + + $this->data['reset_code'] = $reset_code; + $this->data['user_first_name'] = $user_first_name; + $this->load->library('email'); + + if($this->optionslib->get_option('emailProtocol') == "smtp") { + $config = Array( + 'protocol' => $this->optionslib->get_option('emailProtocol'), + 'smtp_crypto' => $this->optionslib->get_option('smtpEncryption'), + 'smtp_host' => $this->optionslib->get_option('smtpHost'), + 'smtp_port' => $this->optionslib->get_option('smtpPort'), + 'smtp_user' => $this->optionslib->get_option('smtpUsername'), + 'smtp_pass' => $this->optionslib->get_option('smtpPassword'), + 'crlf' => "\r\n", + 'newline' => "\r\n" + ); + + $this->email->initialize($config); + } + + $message = $this->load->view('email/admin_reset_password', $this->data, TRUE); + + $this->email->from($this->optionslib->get_option('emailAddress'), $this->optionslib->get_option('emailSenderName')); + $this->email->to($data->user_email); + $this->email->set_mailtype("html"); + $this->email->subject('Cloudlog Account Password Reset'); + $this->email->message($message); + + if (! $this->email->send()) + { + // Redirect to user page with message + $this->session->set_flashdata('notice', 'Email settings are incorrect.'); + redirect('user'); + } else { + // Redirect to user page with message + $this->session->set_flashdata('notice', 'Password Reset Processed.'); + redirect('user'); + } + } else { + // No account found just return to user page + $this->session->set_flashdata('notice', 'Nothing done. No user found.'); + redirect('user'); + } + } + } + function reset_password($reset_code = NULL) { $data['reset_code'] = $reset_code; From a572b4c234c93ca5f3aedaeef16c7199e77db8dd Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:01:23 +0100 Subject: [PATCH 02/12] admin passwort reset html email --- .../views/email/admin_reset_password.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 application/views/email/admin_reset_password.php diff --git a/application/views/email/admin_reset_password.php b/application/views/email/admin_reset_password.php new file mode 100644 index 00000000..e28a2938 --- /dev/null +++ b/application/views/email/admin_reset_password.php @@ -0,0 +1,24 @@ + + + + + + + Password Reset + + +

Hello ,

+ +

An admin initiated a password reset for your Cloudlog account.

+ +

Click here to reset your password.

+ +

Or copy this link into a browser: +

+ +

If you didn't request any password reset, just ignore this email and talk to an admin of your Cloudlog instance.

+ +

Regards,
+ Cloudlog

+ + From 773cbec28a6c882d1e5503fe7dcf8c8838cd8ee9 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:01:39 +0100 Subject: [PATCH 03/12] refractoring of user list --- application/views/user/main.php | 108 +++++++++++++++++--------------- 1 file changed, 59 insertions(+), 49 deletions(-) diff --git a/application/views/user/main.php b/application/views/user/main.php index 8dc9ddd2..3e25a53e 100644 --- a/application/views/user/main.php +++ b/application/views/user/main.php @@ -1,63 +1,73 @@
-
+
-

+

-session->flashdata('notice')) { ?> + session->flashdata('notice')) { ?> - + -
-
- -
-
-

-

-

-
- - - - - - - - - - +
+
+ +
+
+

+

+

+

- +
+ + + + + + + + + + + + - $i = 0; - foreach ($results->result() as $row) { ?> - '; ?> - - - - - - - -
Password Reset
user_id; ?>">user_name; ?>user_email; ?>config->item('auth_level'); echo $l[$row->user_type]; ?> - user_id; ?>" class="btn btn-outline-primary btn-sm"> user_id) { - echo "user_id . " class=\"btn btn-danger btn-sm\"> ".lang('admin_delete').""; - } - ?> -
+ + $i = 0; + foreach ($results->result() as $row) { ?> + '; ?> + user_id; ?>">user_name; ?> + user_callsign; ?> + user_email; ?> + config->item('auth_level'); + echo $l[$row->user_type]; ?> + user_id; ?>" class="btn btn-outline-primary btn-sm"> + + user_id) { + echo "user_id . " class=\"btn btn-primary btn-sm ms-1\">"; + } + ?> + + user_id) { + echo "user_id . " class=\"btn btn-danger btn-sm\">"; + } + ?> + + + + + +
+ +
-

- -

-
- - - - + \ No newline at end of file From 774c6f5236f95ef84e4c6b81e00065de0d4ac566 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:30:40 +0100 Subject: [PATCH 04/12] password reset flash messages --- application/controllers/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index b6638da0..9a5b881d 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -838,7 +838,7 @@ class User extends CI_Controller { // Send email with reset code and first Name of the User $this->data['reset_code'] = $reset_code; - $this->data['user_first_name'] = $user_first_name; + $this->data['user_first_name'] = $user_first_name; // We can call the user by his first name in the E-Mail $this->load->library('email'); if($this->optionslib->get_option('emailProtocol') == "smtp") { @@ -867,16 +867,16 @@ class User extends CI_Controller { if (! $this->email->send()) { // Redirect to user page with message - $this->session->set_flashdata('notice', 'Email settings are incorrect.'); + $this->session->set_flashdata('danger', lang('admin_email_settings_incorrect')); redirect('user'); } else { // Redirect to user page with message - $this->session->set_flashdata('notice', 'Password Reset Processed.'); + $this->session->set_flashdata('success', lang('admin_password_reset_processed')); redirect('user'); } } else { // No account found just return to user page - $this->session->set_flashdata('notice', 'Nothing done. No user found.'); + $this->session->set_flashdata('danger', 'Nothing done. No user found.'); redirect('user'); } } From 6cd37e7a2f6c8e2da2a44ac8435a6bbe0b4b7b35 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:30:50 +0100 Subject: [PATCH 05/12] additional flash messages --- application/views/user/main.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/application/views/user/main.php b/application/views/user/main.php index 3e25a53e..50386aa9 100644 --- a/application/views/user/main.php +++ b/application/views/user/main.php @@ -12,6 +12,22 @@ + session->flashdata('success')) { ?> + + + + + + session->flashdata('danger')) { ?> + + + + +
@@ -20,6 +36,7 @@

+

@@ -31,7 +48,7 @@ - Password Reset + From 613b7b4620ee64e832406e557f1f058c877a7793 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 01:31:04 +0100 Subject: [PATCH 06/12] password reset language --- application/language/bulgarian/admin_lang.php | 32 +++++++++++-------- .../chinese_simplified/admin_lang.php | 4 +++ application/language/czech/admin_lang.php | 4 +++ application/language/dutch/admin_lang.php | 4 +++ application/language/english/admin_lang.php | 4 +++ application/language/finnish/admin_lang.php | 4 +++ application/language/french/admin_lang.php | 4 +++ application/language/german/admin_lang.php | 4 +++ application/language/greek/admin_lang.php | 4 +++ application/language/italian/admin_lang.php | 4 +++ application/language/polish/admin_lang.php | 4 +++ application/language/russian/admin_lang.php | 4 +++ application/language/spanish/admin_lang.php | 4 +++ application/language/swedish/admin_lang.php | 4 +++ application/language/turkish/admin_lang.php | 4 +++ 15 files changed, 74 insertions(+), 14 deletions(-) diff --git a/application/language/bulgarian/admin_lang.php b/application/language/bulgarian/admin_lang.php index e48558ba..899c07d1 100644 --- a/application/language/bulgarian/admin_lang.php +++ b/application/language/bulgarian/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('Не е разрешен директен дост $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -15,17 +16,20 @@ $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; $lang['admin_delete'] = 'Delete'; -$lang['admin_remove'] = "Remove"; +$lang['admin_remove'] = "Remove"; $lang['admin_edit'] = 'Edit'; -$lang['admin_create'] = 'Create'; -$lang['admin_update'] = 'Update'; -$lang['admin_copy'] = 'Copy'; -$lang['admin_save'] = 'Save'; -$lang['admin_close'] = 'Close'; +$lang['admin_create'] = 'Create'; +$lang['admin_update'] = 'Update'; +$lang['admin_copy'] = 'Copy'; +$lang['admin_save'] = 'Save'; +$lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; -$lang['admin_danger'] = 'DANGER!'; -$lang['admin_experimental'] = "Experimental"; +$lang['admin_danger'] = 'DANGER!'; +$lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu @@ -40,16 +44,16 @@ $lang['admin_contest_menu_activate'] = 'Activate'; $lang['admin_contest_menu_deactivate'] = 'Deactivate'; $lang['admin_contest_add_contest'] = 'Add a Contest'; -$lang["admin_contest_create"] = "Create"; +$lang["admin_contest_create"] = "Create"; $lang['admin_contest_all_active'] = 'Activate All'; $lang['admin_contest_all_deactive'] = 'Deactivate All'; $lang['admin_contest_name_adif'] = 'Contest ADIF Name'; $lang['admin_contest_name_of_contest'] = 'Name of the Contest'; $lang['admin_contest_name_of_adif'] = 'Name of Contest in ADIF-specification'; -$lang['admin_contest_edit_active_hint'] = 'Set to active if to be listed in Contest-list'; -$lang['admin_contest_edit_update_contest'] = 'Update Contest'; -$lang['admin_contest_deletion_warning'] = 'Warning! Are you sure you want to delete the following contest: '; -$lang['admin_contest_active_all_warning'] = 'Warning! Are you sure you want to activate all contests?'; -$lang['admin_contest_deactive_all_warning'] = 'Warning! Are you sure you want to deactivate all contests?'; +$lang['admin_contest_edit_active_hint'] = 'Set to active if to be listed in Contest-list'; +$lang['admin_contest_edit_update_contest'] = 'Update Contest'; +$lang['admin_contest_deletion_warning'] = 'Warning! Are you sure you want to delete the following contest: '; +$lang['admin_contest_active_all_warning'] = 'Warning! Are you sure you want to activate all contests?'; +$lang['admin_contest_deactive_all_warning'] = 'Warning! Are you sure you want to deactivate all contests?'; diff --git a/application/language/chinese_simplified/admin_lang.php b/application/language/chinese_simplified/admin_lang.php index 994d8d9e..b8d8b8bb 100644 --- a/application/language/chinese_simplified/admin_lang.php +++ b/application/language/chinese_simplified/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog至少需要配置一个用户才能运行。'; $lang['admin_user_line2'] = '用户可以被分配不同的角色,这些角色赋予他们不同的权限,例如向日志簿添加 QSO 和访问Cloudlog API。'; $lang['admin_user_line3'] = '页面右上方显示当前登录的用户。'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = '用户列表'; @@ -25,7 +26,10 @@ $lang['admin_close'] = '关闭'; $lang['admin_user_accounts'] = '用户账户'; $lang['admin_danger'] = '危险!'; $lang['admin_experimental'] = "实验性功能"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/czech/admin_lang.php b/application/language/czech/admin_lang.php index 890fb449..6eda81c2 100644 --- a/application/language/czech/admin_lang.php +++ b/application/language/czech/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog potřebuje alespoň jednoho uživatele nastaveného pro svůj provoz.'; $lang['admin_user_line2'] = 'Uživatelům mohou být přiděleny role, které jim udělují různá oprávnění, jako je přidávání QSO do logu a přístup k Cloudlog API.'; $lang['admin_user_line3'] = 'Nyní přihlášený uživatel je zobrazen v pravém horním rohu každé stránky.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'Seznam uživatelů'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/dutch/admin_lang.php b/application/language/dutch/admin_lang.php index 2f498237..2fee2c03 100644 --- a/application/language/dutch/admin_lang.php +++ b/application/language/dutch/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('Directe toegang tot scripts is niet toegestaan'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/english/admin_lang.php b/application/language/english/admin_lang.php index f045c1a9..fe9c4601 100644 --- a/application/language/english/admin_lang.php +++ b/application/language/english/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/finnish/admin_lang.php b/application/language/finnish/admin_lang.php index ca8b5d12..9825c889 100644 --- a/application/language/finnish/admin_lang.php +++ b/application/language/finnish/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog tarvitsee toimiakseen vähintään yhden luodun käyttäjän.'; $lang['admin_user_line2'] = 'Käyttäjille voidaan määrittää rooleja, jotka antavat heille erilaisia käyttöoikeuksia, kuten QSO:n lisääminen lokikirjaan ja pääsy Cloudlog-sovellusliittymiin (API).'; $lang['admin_user_line3'] = 'Tällä hetkellä kirjautunut käyttäjä näkyy jokaisen sivun oikeassa yläkulmassa.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'Käyttäjälista'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/french/admin_lang.php b/application/language/french/admin_lang.php index b76b67ff..d41834fa 100644 --- a/application/language/french/admin_lang.php +++ b/application/language/french/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = "Cloudlog a besoin d'au moins un utilisateur configuré pour fonctionner."; $lang['admin_user_line2'] = "Les utilisateurs peuvent se voir attribuer des rôles qui leur donnent différentes autorisations, telles que l'ajout de QSO au journal de trafic et l'accès aux API Cloudlog."; $lang['admin_user_line3'] = "L'utilisateur actuellement connecté est affiché en haut à droite de chaque page."; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = "Liste des utilisateurs"; @@ -25,7 +26,10 @@ $lang['admin_close'] = "Fermer"; $lang['admin_user_accounts'] = "Compte des utilisateurs"; $lang['admin_danger'] = "DANGER!"; $lang['admin_experimental'] = "Expérimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/german/admin_lang.php b/application/language/german/admin_lang.php index 683ad29e..15231d66 100644 --- a/application/language/german/admin_lang.php +++ b/application/language/german/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('Direkter Zugriff auf Skripte ist nicht erlaubt'); $lang['admin_user_line1'] = 'Es muss mindestens ein Benutzer konfiguriert sein, damit Cloudlog funktioniert.'; $lang['admin_user_line2'] = 'Benutzer können verschiedene Rollen zugewiesen bekommen, die ihnen unterschiedliche Rechte geben wie QSOs zum Logbuch hinzuzufügen und die APIs von Cloudlog zu benutzen'; $lang['admin_user_line3'] = 'Der aktuell angemeldete Benutzer wird oben rechts auf jeder Seite angezeigt.'; +$lang['admin_user_line4'] = "Mit dem Passwort Reset Knopf kannst du dem Benutzer eine E-Mail mit einem Passwort-Reset Link zuschicken. Dafür müssen die E-Mail Einstellungen in den globalen Optionen korrekt eingerichtet sein."; $lang['admin_user_list'] = 'Benutzer Liste'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Schliessen'; $lang['admin_user_accounts'] = 'Benutzerkonten'; $lang['admin_danger'] = 'ACHTUNG!'; $lang['admin_experimental'] = "Experimentell"; +$lang['admin_password_reset'] = "Passwort zurücksetzen"; +$lang['admin_email_settings_incorrect'] = "E-Mail Einstellungen sind nicht korrekt."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail verschickt."; // Contest Menu diff --git a/application/language/greek/admin_lang.php b/application/language/greek/admin_lang.php index f045c1a9..fe9c4601 100644 --- a/application/language/greek/admin_lang.php +++ b/application/language/greek/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/italian/admin_lang.php b/application/language/italian/admin_lang.php index f045c1a9..fe9c4601 100644 --- a/application/language/italian/admin_lang.php +++ b/application/language/italian/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/polish/admin_lang.php b/application/language/polish/admin_lang.php index f045c1a9..fe9c4601 100644 --- a/application/language/polish/admin_lang.php +++ b/application/language/polish/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/russian/admin_lang.php b/application/language/russian/admin_lang.php index 79440283..dfdc4ed8 100644 --- a/application/language/russian/admin_lang.php +++ b/application/language/russian/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Для работы Cloudlog требуется хотя наличие хотя бы одного пользовательского аккаунта.'; $lang['admin_user_line2'] = 'Пользователям могут быть назначены роли, которые предоставляют им различные права, например, добавление QSO в журнал и доступ к API Cloudlog.'; $lang['admin_user_line3'] = 'Текущий вошедший в систему пользователь отображается в правом верхнем углу каждой страницы.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'Список пользователей'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'Аккаунты пользователей'; $lang['admin_danger'] = 'ОПАСНО!'; $lang['admin_experimental'] = "Экспериментально"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/spanish/admin_lang.php b/application/language/spanish/admin_lang.php index f045c1a9..fe9c4601 100644 --- a/application/language/spanish/admin_lang.php +++ b/application/language/spanish/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/swedish/admin_lang.php b/application/language/swedish/admin_lang.php index ab4babfb..e95340e7 100644 --- a/application/language/swedish/admin_lang.php +++ b/application/language/swedish/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['admin_user_line1'] = 'Cloudlog behöver minst en användare konfigurerad för att fungera.'; $lang['admin_user_line2'] = 'Användare kan tilldelas roller som ger dem olika behörigheter, som att lägga till QSO:er i loggboken och komma åt Cloudlog API:er.'; $lang['admin_user_line3'] = 'Den för närvarande inloggade användaren visas uppe till höger på varje sida.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'Användarlista'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu diff --git a/application/language/turkish/admin_lang.php b/application/language/turkish/admin_lang.php index 574a8a8a..aaad05d1 100644 --- a/application/language/turkish/admin_lang.php +++ b/application/language/turkish/admin_lang.php @@ -5,6 +5,7 @@ defined('BASEPATH') OR exit('Doğrudan komut dosyası erişimine izin verilmez') $lang['admin_user_line1'] = 'Cloudlog needs at least one user configured in order to operate.'; $lang['admin_user_line2'] = 'Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.'; $lang['admin_user_line3'] = 'The currently logged-in user is displayed at the upper-right of each page.'; +$lang['admin_user_line4'] = "With the password reset button, you can send a user an email containing a link to reset their password. To achieve this, ensure that the email settings in the global options are configured correctly."; $lang['admin_user_list'] = 'User List'; @@ -25,7 +26,10 @@ $lang['admin_close'] = 'Close'; $lang['admin_user_accounts'] = 'User Accounts'; $lang['admin_danger'] = 'DANGER!'; $lang['admin_experimental'] = "Experimental"; +$lang['admin_password_reset'] = "Password Reset"; +$lang['admin_email_settings_incorrect'] = "Email settings are incorrect."; +$lang['admin_password_reset_processed'] = "Password Reset E-Mail sent."; // Contest Menu From 8298e1bfcfab40a994e78be8843fc6bec08ebb4d Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 02:07:22 +0100 Subject: [PATCH 07/12] last login language --- application/language/bulgarian/admin_lang.php | 1 + application/language/bulgarian/general_words_lang.php | 1 + application/language/chinese_simplified/admin_lang.php | 1 + application/language/chinese_simplified/general_words_lang.php | 1 + application/language/czech/admin_lang.php | 1 + application/language/czech/general_words_lang.php | 1 + application/language/dutch/admin_lang.php | 1 + application/language/dutch/general_words_lang.php | 1 + application/language/english/admin_lang.php | 1 + application/language/english/general_words_lang.php | 1 + application/language/finnish/admin_lang.php | 1 + application/language/finnish/general_words_lang.php | 1 + application/language/french/admin_lang.php | 1 + application/language/french/general_words_lang.php | 1 + application/language/german/admin_lang.php | 1 + application/language/german/general_words_lang.php | 1 + application/language/greek/admin_lang.php | 1 + application/language/greek/general_words_lang.php | 1 + application/language/italian/admin_lang.php | 1 + application/language/italian/general_words_lang.php | 1 + application/language/polish/admin_lang.php | 1 + application/language/polish/general_words_lang.php | 1 + application/language/russian/admin_lang.php | 1 + application/language/russian/general_words_lang.php | 1 + application/language/spanish/admin_lang.php | 1 + application/language/spanish/general_words_lang.php | 1 + application/language/swedish/admin_lang.php | 1 + application/language/swedish/general_words_lang.php | 1 + application/language/turkish/admin_lang.php | 1 + application/language/turkish/general_words_lang.php | 1 + 30 files changed, 30 insertions(+) diff --git a/application/language/bulgarian/admin_lang.php b/application/language/bulgarian/admin_lang.php index 899c07d1..88b5d392 100644 --- a/application/language/bulgarian/admin_lang.php +++ b/application/language/bulgarian/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/bulgarian/general_words_lang.php b/application/language/bulgarian/general_words_lang.php index 48ecdc09..9c4889bf 100644 --- a/application/language/bulgarian/general_words_lang.php +++ b/application/language/bulgarian/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Дата'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/chinese_simplified/admin_lang.php b/application/language/chinese_simplified/admin_lang.php index b8d8b8bb..05819370 100644 --- a/application/language/chinese_simplified/admin_lang.php +++ b/application/language/chinese_simplified/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = '用户列表'; $lang['admin_user'] = '用户名'; $lang['admin_email'] = '电子邮件'; $lang['admin_type'] = '用户类型'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = '设置'; $lang['admin_create_user'] = '创建用户'; diff --git a/application/language/chinese_simplified/general_words_lang.php b/application/language/chinese_simplified/general_words_lang.php index 6248f91e..f3bf6054 100644 --- a/application/language/chinese_simplified/general_words_lang.php +++ b/application/language/chinese_simplified/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "数量"; $lang['general_word_filtering_on'] = "筛选打开"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = '日期'; $lang['general_word_startdate'] = "开始时间"; diff --git a/application/language/czech/admin_lang.php b/application/language/czech/admin_lang.php index 6eda81c2..d0cb04ac 100644 --- a/application/language/czech/admin_lang.php +++ b/application/language/czech/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'Seznam uživatelů'; $lang['admin_user'] = 'Uživatel'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Typ'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Možnosti'; $lang['admin_create_user'] = 'Vytvořit uživatele'; diff --git a/application/language/czech/general_words_lang.php b/application/language/czech/general_words_lang.php index 4615e07d..e6129f04 100644 --- a/application/language/czech/general_words_lang.php +++ b/application/language/czech/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/dutch/admin_lang.php b/application/language/dutch/admin_lang.php index 2fee2c03..a0fbce5c 100644 --- a/application/language/dutch/admin_lang.php +++ b/application/language/dutch/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/dutch/general_words_lang.php b/application/language/dutch/general_words_lang.php index dfe9e6ab..82903a67 100644 --- a/application/language/dutch/general_words_lang.php +++ b/application/language/dutch/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/english/admin_lang.php b/application/language/english/admin_lang.php index fe9c4601..2560697f 100644 --- a/application/language/english/admin_lang.php +++ b/application/language/english/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index 93793b1d..b59d66ad 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Date'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/finnish/admin_lang.php b/application/language/finnish/admin_lang.php index 9825c889..8c1ed2b8 100644 --- a/application/language/finnish/admin_lang.php +++ b/application/language/finnish/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'Käyttäjälista'; $lang['admin_user'] = 'Käyttäjä'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Rooli'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Valinnat'; $lang['admin_create_user'] = 'Luo käyttäjä'; diff --git a/application/language/finnish/general_words_lang.php b/application/language/finnish/general_words_lang.php index 07794d42..7a384376 100644 --- a/application/language/finnish/general_words_lang.php +++ b/application/language/finnish/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Päivä'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/french/admin_lang.php b/application/language/french/admin_lang.php index d41834fa..d87c4285 100644 --- a/application/language/french/admin_lang.php +++ b/application/language/french/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = "Liste des utilisateurs"; $lang['admin_user'] = "Utilisateur"; $lang['admin_email'] = "E-mail"; $lang['admin_type'] = "Type"; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = "Options"; $lang['admin_create_user'] = "Création d'un utilisateur"; diff --git a/application/language/french/general_words_lang.php b/application/language/french/general_words_lang.php index 37887ba3..ca5da08f 100644 --- a/application/language/french/general_words_lang.php +++ b/application/language/french/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Nombre"; $lang['general_word_filtering_on'] = "Filtré sur"; $lang['general_word_not_display'] = "Ne pas afficher"; $lang['general_word_icon'] = "Icône"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = "Date"; $lang['general_word_startdate'] = "Date début"; diff --git a/application/language/german/admin_lang.php b/application/language/german/admin_lang.php index 15231d66..113fed3e 100644 --- a/application/language/german/admin_lang.php +++ b/application/language/german/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'Benutzer Liste'; $lang['admin_user'] = 'Benutzer'; $lang['admin_email'] = 'E-Mail'; $lang['admin_type'] = 'Typ'; +$lang['admin_last_login'] = "Letzter Login"; $lang['admin_options'] = 'Optionen'; $lang['admin_create_user'] = 'Benutzer anlegen'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index 95dbcd29..fe979978 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Zähler"; $lang['general_word_filtering_on'] = "Filtern auf"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Nie"; $lang['general_word_date'] = 'Datum'; $lang['general_word_startdate'] = "Start Datum"; diff --git a/application/language/greek/admin_lang.php b/application/language/greek/admin_lang.php index fe9c4601..2560697f 100644 --- a/application/language/greek/admin_lang.php +++ b/application/language/greek/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/greek/general_words_lang.php b/application/language/greek/general_words_lang.php index 32ee11e9..9348a5f0 100644 --- a/application/language/greek/general_words_lang.php +++ b/application/language/greek/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Ημερομηνία'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/italian/admin_lang.php b/application/language/italian/admin_lang.php index fe9c4601..2560697f 100644 --- a/application/language/italian/admin_lang.php +++ b/application/language/italian/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/italian/general_words_lang.php b/application/language/italian/general_words_lang.php index 5c3a2527..f618ef6a 100644 --- a/application/language/italian/general_words_lang.php +++ b/application/language/italian/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Data'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/polish/admin_lang.php b/application/language/polish/admin_lang.php index fe9c4601..2560697f 100644 --- a/application/language/polish/admin_lang.php +++ b/application/language/polish/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/polish/general_words_lang.php b/application/language/polish/general_words_lang.php index 142db493..bafb4353 100644 --- a/application/language/polish/general_words_lang.php +++ b/application/language/polish/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Data'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/russian/admin_lang.php b/application/language/russian/admin_lang.php index dfdc4ed8..2cd36711 100644 --- a/application/language/russian/admin_lang.php +++ b/application/language/russian/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'Список пользователей'; $lang['admin_user'] = 'Пользователь'; $lang['admin_email'] = 'Емэйл'; $lang['admin_type'] = 'Роль'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Опции'; $lang['admin_create_user'] = 'Создать пользователя'; diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index d0409c41..4e67ae7c 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Счётчик"; $lang['general_word_filtering_on'] = "Отфильтровано по"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Дата'; $lang['general_word_startdate'] = "Дата начала"; diff --git a/application/language/spanish/admin_lang.php b/application/language/spanish/admin_lang.php index fe9c4601..2560697f 100644 --- a/application/language/spanish/admin_lang.php +++ b/application/language/spanish/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/spanish/general_words_lang.php b/application/language/spanish/general_words_lang.php index 68f081a2..1a5f1ff9 100644 --- a/application/language/spanish/general_words_lang.php +++ b/application/language/spanish/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Fecha'; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/swedish/admin_lang.php b/application/language/swedish/admin_lang.php index e95340e7..4b5b927b 100644 --- a/application/language/swedish/admin_lang.php +++ b/application/language/swedish/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'Användarlista'; $lang['admin_user'] = 'Användare'; $lang['admin_email'] = 'E-post'; $lang['admin_type'] = 'Typ'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Alternativ'; $lang['admin_create_user'] = 'Skapa användare'; diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index 0b72fa50..d913f625 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_enabled'] = "Enabled"; $lang['general_word_disabled'] = "Disabled"; $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; +$lang['general_word_never'] = "Never"; $lang['general_word_export'] = "Export"; $lang['general_word_import'] = "Import"; $lang['general_word_startdate'] = "Start Date"; diff --git a/application/language/turkish/admin_lang.php b/application/language/turkish/admin_lang.php index aaad05d1..13890cc9 100644 --- a/application/language/turkish/admin_lang.php +++ b/application/language/turkish/admin_lang.php @@ -12,6 +12,7 @@ $lang['admin_user_list'] = 'User List'; $lang['admin_user'] = 'User'; $lang['admin_email'] = 'E-mail'; $lang['admin_type'] = 'Type'; +$lang['admin_last_login'] = "Last Login"; $lang['admin_options'] = 'Options'; $lang['admin_create_user'] = 'Create user'; diff --git a/application/language/turkish/general_words_lang.php b/application/language/turkish/general_words_lang.php index 56be209f..8144d051 100644 --- a/application/language/turkish/general_words_lang.php +++ b/application/language/turkish/general_words_lang.php @@ -25,6 +25,7 @@ $lang['general_word_count'] = "Count"; $lang['general_word_filtering_on'] = "Filtering on"; $lang['general_word_not_display'] = "Not display"; $lang['general_word_icon'] = "Icon"; +$lang['general_word_never'] = "Never"; $lang['general_word_date'] = 'Tarih'; $lang['general_word_startdate'] = "Start Date"; From e498f8507441e6d1be834344bc8e5071533bb7be Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 02:07:47 +0100 Subject: [PATCH 08/12] add last login column to users table --- application/config/migration.php | 2 +- application/migrations/167_add_last_login.php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 application/migrations/167_add_last_login.php diff --git a/application/config/migration.php b/application/config/migration.php index a6519c61..6fc48a75 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 166; +$config['migration_version'] = 167; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/167_add_last_login.php b/application/migrations/167_add_last_login.php new file mode 100644 index 00000000..d14d21e7 --- /dev/null +++ b/application/migrations/167_add_last_login.php @@ -0,0 +1,22 @@ +db->field_exists('last_login_date', 'users')) { + $fields = array( + 'last_login_date TIMESTAMP NULL DEFAULT NULL AFTER `reset_password_date`', + ); + $this->dbforge->add_column('users', $fields); + } + } + + public function down() + { + $this->dbforge->drop_column('users', 'last_login_date'); + } +} From 1697e9863f4b76118b9edbd7a510c2621c419674 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 02:08:12 +0100 Subject: [PATCH 09/12] set last login timestamp when login --- application/controllers/User.php | 1 + application/models/User_model.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/application/controllers/User.php b/application/controllers/User.php index 9a5b881d..ac447cf9 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -695,6 +695,7 @@ class User extends CI_Controller { if($this->user_model->login() == 1) { $this->session->set_flashdata('notice', 'User logged in'); $this->user_model->update_session($data['user']->user_id); + $this->user_model->set_last_login($data['user']->user_id); $cookie= array( 'name' => 'language', diff --git a/application/models/User_model.php b/application/models/User_model.php index 7a7d5b6e..57c97a05 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -423,6 +423,16 @@ class User_Model extends CI_Model { return 0; } + // FUNCTION: set's the last-login timestamp in user table + function set_last_login($user_id) { + $data = array( + 'last_login_date' => date('Y-m-d H:i:s') + ); + + $this->db->where('user_id', $user_id); + $this->db->update('users', $data); + } + // FUNCTION: bool authorize($level) // Checks a user's level of access against the given $level function authorize($level) { From 326e1b040c491b9eb5b9d9f838f34ab4591b9a4f Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 02:08:23 +0100 Subject: [PATCH 10/12] show last login in users table --- application/views/user/main.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/views/user/main.php b/application/views/user/main.php index 50386aa9..b90840b1 100644 --- a/application/views/user/main.php +++ b/application/views/user/main.php @@ -47,6 +47,7 @@ + Last login @@ -64,6 +65,13 @@ user_email; ?> config->item('auth_level'); echo $l[$row->user_type]; ?> + last_login_date != null) { + echo $row->last_login_date; + } else { + echo lang('general_word_never'); + }?> + user_id; ?>" class="btn btn-outline-primary btn-sm"> Date: Mon, 1 Jan 2024 02:44:03 +0100 Subject: [PATCH 11/12] comments --- application/controllers/User.php | 1 + application/migrations/167_add_last_login.php | 2 ++ application/views/user/main.php | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index ac447cf9..84e22fe6 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -805,6 +805,7 @@ class User extends CI_Controller { } } + // Send an E-Mail to the user. Function is similar to forgot_password() function admin_send_passwort_reset() { $this->load->model('user_model'); diff --git a/application/migrations/167_add_last_login.php b/application/migrations/167_add_last_login.php index d14d21e7..802b6331 100644 --- a/application/migrations/167_add_last_login.php +++ b/application/migrations/167_add_last_login.php @@ -2,6 +2,8 @@ defined('BASEPATH') or exit('No direct script access allowed'); +// Adding a column to users table for the timestamp of the last login + class Migration_add_last_login extends CI_Migration { diff --git a/application/views/user/main.php b/application/views/user/main.php index b90840b1..b06344a0 100644 --- a/application/views/user/main.php +++ b/application/views/user/main.php @@ -47,7 +47,7 @@ - Last login + @@ -66,7 +66,7 @@ config->item('auth_level'); echo $l[$row->user_type]; ?> last_login_date != null) { + if ($row->last_login_date != null) { // if the user never logged in before the value is null. We can show "never" then. echo $row->last_login_date; } else { echo lang('general_word_never'); From 194793e3ae2ea40d7cd30429622728a6aa233fc6 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 1 Jan 2024 12:49:24 +0100 Subject: [PATCH 12/12] back to plain text email --- application/controllers/User.php | 6 +-- .../views/email/admin_reset_password.php | 37 +++++++------------ 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index 84e22fe6..927ceffd 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -834,13 +834,14 @@ class User extends CI_Controller { // Generate password reset code 50 characters long $this->load->helper('string'); $reset_code = random_string('alnum', 50); - $user_first_name = $data->user_firstname; $this->user_model->set_password_reset_code(($data->user_email), $reset_code); // Send email with reset code and first Name of the User $this->data['reset_code'] = $reset_code; - $this->data['user_first_name'] = $user_first_name; // We can call the user by his first name in the E-Mail + $this->data['user_firstname'] = $data->user_firstname; // We can call the user by his first name in the E-Mail + $this->data['user_callsign'] = $data->user_callsign; + $this->data['user_name'] = $data->user_name; $this->load->library('email'); if($this->optionslib->get_option('emailProtocol') == "smtp") { @@ -862,7 +863,6 @@ class User extends CI_Controller { $this->email->from($this->optionslib->get_option('emailAddress'), $this->optionslib->get_option('emailSenderName')); $this->email->to($data->user_email); - $this->email->set_mailtype("html"); $this->email->subject('Cloudlog Account Password Reset'); $this->email->message($message); diff --git a/application/views/email/admin_reset_password.php b/application/views/email/admin_reset_password.php index e28a2938..954b1c73 100644 --- a/application/views/email/admin_reset_password.php +++ b/application/views/email/admin_reset_password.php @@ -1,24 +1,15 @@ - - - - - - - Password Reset - - -

Hello ,

- -

An admin initiated a password reset for your Cloudlog account.

- -

Click here to reset your password.

+Hello -

Or copy this link into a browser: -

- -

If you didn't request any password reset, just ignore this email and talk to an admin of your Cloudlog instance.

- -

Regards,
- Cloudlog

- - + +An admin initiated a password reset for your Cloudlog account. + +Your username is: + + +Click here to reset your password: + + +If you didn't request any password reset, just ignore this email and talk to an admin of your Cloudlog instance. + +Regards, +Cloudlog