diff --git a/application/controllers/Installation.php b/application/controllers/Installation.php index 18dffb83..5c3eb8fe 100644 --- a/application/controllers/Installation.php +++ b/application/controllers/Installation.php @@ -143,7 +143,7 @@ class Installation extends CI_Controller { $services['id'] = $this->services_model->add($services); $salt = generate_salt(); - $password = random_string('sha1', 12); + $password = random_string('alnum', 12); $sample_provider = [ 'first_name' => 'John', diff --git a/application/models/User_model.php b/application/models/User_model.php index 376a8c90..417734aa 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -186,7 +186,7 @@ class User_Model extends CI_Model { $user_id = $result->row()->id; // Create a new password and send it with an email to the given email address. - $new_password = random_string('sha1', 12); + $new_password = random_string('alnum', 12); $salt = $this->db->get_where('user_settings', ['id_users' => $user_id])->row()->salt; $hash_password = hash_password($salt, $new_password); $this->db->update('user_settings', ['password' => $hash_password], ['id_users' => $user_id]);