forked from mirrors/easyappointments
Use the "alnum" method when generating random strings via the codeigniter helper function (generates shorter strings)
This commit is contained in:
parent
8dce5bf17a
commit
cfc6167d4f
2 changed files with 2 additions and 2 deletions
|
@ -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',
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue