From c7da716893f1649b85359a661819fbf22093b079 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 17 Aug 2024 11:35:30 +0200 Subject: [PATCH] adjusted comments --- application/controllers/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index 3fab408b3..5591f1569 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -1164,6 +1164,7 @@ class User extends CI_Controller { public function impersonate() { + // If the encryption key is still default, we can't impersonate another user for security reasons if ($this->config->item('encryption_key') == 'flossie1234555541') { $this->session->set_flashdata('error', __("You currently can't impersonate another user. Please change the encryption_key in the config file first!")); redirect('dashboard'); @@ -1197,11 +1198,9 @@ class User extends CI_Controller { // Update the session with the new user_id // TODO: Find a solution for sessiondata 'radio' and 'station_profile_id', so a user would be able to use e.g. his own radio while impersonating another user // Due the fact that the user is now impersonating another user, he can't use his default radio anymore - - // Update the session with the new user_id $this->user_model->update_session($user_id); - // Redirect to the dashboard + // Redirect to the dashboard, the user should now be logged in as the other user redirect('dashboard'); } }