Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated function hash() #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ function login_authenticate_start()
function sync_user_details($user_info)
{
// Sync EE password to match LDAP (if account exists)
$encrypted_password = $this->EE->functions->hash(stripslashes($user_info['password']));
$this->EE->load->helper('security');
$encrypted_password = do_hash(stripslashes($user_info['password']));
$sql = 'UPDATE exp_members SET password = \''.$this->EE->db->escape_str($encrypted_password).'\' WHERE username = \''.$this->EE->db->escape_str($user_info['username']).'\'';
$this->debug_print('Updating user with SQL: '.$sql);
$this->EE->db->query($sql);
Expand Down Expand Up @@ -290,7 +291,7 @@ function create_ee_user($user_info, $encrypted_password)
$member_id = $this->EE->member_model->create_member($data);
if ($member_id > 0) // update other relevant fields
{
$sql = 'UPDATE exp_members SET photo_filename = \'photo_'.$member_id.'.jpg\', photo_width = \'90\', photo_height = \'120\'';
$sql = 'UPDATE exp_members SET photo_filename = \'photo_'.$member_id.'.jpg\', photo_width = \'90\', photo_height = \'120\' WHERE member_id ='.$member_id;
$query = $this->EE->db->query($sql);

//$this->EE->db->query('INSERT INTO exp_member_data SET member_id = '.$this->EE->db->escape_str($member_id));
Expand Down Expand Up @@ -435,4 +436,4 @@ function ldap_encode($text)
// END CLASS Nce_ldap

/* End of file ext.nce_ldap.php */
/* Location: ./system/expressionengine/third_party/nce_ldap/ext.nce_ldap.php */
/* Location: ./system/expressionengine/third_party/nce_ldap/ext.nce_ldap.php */