ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Automating Member Creation and Setting the Initial Password

February 01, 2012 10:08am

Subscribe [2]
  • #1 / Feb 01, 2012 10:08am

    Milsoft

    27 posts

    Hello all,

    I’ve integrated EE with SugarCRM for a client. In doing this, I’ve created an EE rest api that I can hit from SugarCRM to do things like “Convert SugarCRM Contact to EE Member”. Everything works really well, the only problem is the password situation.

    How do I get the initial password to the new EE Member?

    Ideally, I’d like to send an activation email to the new EE member and when they click the activation link it’ll prompt the new user to set their password. This is good because there’s no passwords being sent over email. Is this possible out of the box? Any ideas for how to implement this?

    If that’s not possible, the next best thing would be to add the temporary password I generate from SugarCRM in the activation email. One of the issues with this is that the {password} field isn’t available in the fields to use in the “Member Account Activation Instructions” or “Member Account Validation Notification” email templates. How can I add the {password} field to those email notification templates?

    Lastly, if all else fails, I’ll have to have SugarCRM send the account activation instructions email when it receives a successful response from the EE api. This works, but it’s not ideal in my opinion as that seems to be something EE should handle since we’re corresponding with an EE member.

    Any ideas?

    Thanks!

  • #2 / Feb 01, 2012 10:15am

    Bhashkar Yadav

    727 posts

    did you try this

    $this->EE->functions->hash(stripslashes($member_password));

     

  • #3 / Feb 01, 2012 10:29am

    Milsoft

    27 posts

    That’s what’s used to store the password in the database when the member is created, but I’m not sure it’ll help me any getting the password to the EE member.

  • #4 / Feb 01, 2012 10:45am

    Bhashkar Yadav

    727 posts

    ahhh yes, please use

    sha1(stripslashes($member_password));
  • #5 / Feb 01, 2012 11:34am

    Milsoft

    27 posts

    I appreciate the help, but we’re not on the same page. I’m not looking for how to encrypt the password. I need to solve the problem of getting a password to the new member that was programmatically created.

  • #6 / Feb 01, 2012 12:29pm

    Milsoft

    27 posts

    I figured out how to do the first option, and it was pretty simple. Simply redirect the user to a change password page when they activate their account. This can be accomplished through a simple extension hook, and as it goes 99% of the time, there’s a free extension already out there to do this: http://devot-ee.com/add-ons/member-activation-redirect

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases