We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Change password from external form

Development and Programming

Bucaneer97's avatar
Bucaneer97
9 posts
about 15 years ago
Bucaneer97's avatar Bucaneer97

Hi everybody!

I’m using an external form to display and modify users information, my problem now is for the password change, could some one help me to find which function is used by EE to crypt the password and the key and the unique ID, in that way I can allow my users to change password via my form

thank you

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
about 15 years ago
John Henry Donovan's avatar John Henry Donovan

Bucaneer97,

Are you using EE’s profile update templates for this or a completely external form? Are you using any add-on to achieve this as I know you can do it with ease with Solspace’s User Module

To answer your question the function is called do_hash() and is in a file called system\codeigniter\system\helpers\security_helper.php

I am going to move this thread to our development forum as more appropriate there

       
Bucaneer97's avatar
Bucaneer97
9 posts
about 15 years ago
Bucaneer97's avatar Bucaneer97

Hi John,

Thank you for your answer, Actually am using a completely external form to create a profile with information included in expressionengine database an others that EE can’t hold for what I added other tables in DB, that’s why I need this function, by the way do you know how this function is used to create the key and the unique ID?

       
Bucaneer97's avatar
Bucaneer97
9 posts
14 years ago
Bucaneer97's avatar Bucaneer97

Hi everybody,

I still looking for the way how EE create the key and the unique ID

any help please?

       
Victor Michnowicz's avatar
Victor Michnowicz
95 posts
14 years ago
Victor Michnowicz's avatar Victor Michnowicz

The member_id is generated by MySQL. It is just an auto incrementing unsigned integer.

The password is the password the user supplied, but hashed using the do_hash() function. The do_hash() function will return a sha1 of the user-supplied password.

       
Bucaneer97's avatar
Bucaneer97
9 posts
14 years ago
Bucaneer97's avatar Bucaneer97

Thank you elvicmic,

What you said is great but my question is how to create the key and the unique ID for each user in exp_members normally if you create a user via EE interface it’s done automatically. In my case I’m creating users via an external form so for password I’m using do_hash(),but for key and the unique ID I don’t know which function I have to use for. that makes the function forgot password provided by EE unuseful for me

       
Victor Michnowicz's avatar
Victor Michnowicz
95 posts
14 years ago
Victor Michnowicz's avatar Victor Michnowicz

The unique_id is really just another sha1:

do_hash(uniqid(mt_rand(), TRUE), 'sha1');

And as far as I can tell the crypt_key is exactly the same too.

       
Bucaneer97's avatar
Bucaneer97
9 posts
14 years ago
Bucaneer97's avatar Bucaneer97

Thank you,

That was what I’m looking for.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.