Password Token For Signup Email

Discussion in 'aMember Pro v.4' started by forexincomemap, May 17, 2012.

  1. forexincomemap

    forexincomemap New Member

    Joined:
    Apr 25, 2012
    Messages:
    2
    Hi guys,

    I am using v4.1 stable and cannot get the user's password to appear in the Signup Email. I have tried to modify the Signup Email and use the following but no luck:

    Your Password: %password%
    Your Password: %user.password%

    Both of these do not work and the results in my email sent to users shows up as:

    Your User ID: wayne_edwards
    Your Password:

    We are not using the signup page. Instead, users go from our sales page to purchase from Clickbank then get added on to Amember. The password should be generated by the system like with v3 but I cannot find the option anywhere.

    Would greatly appreciate if anyone can clarify whether this is possible so that I can change to v3 if it will not work on v4.

    Many thanks in advance!
    Wesley
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Have you enabled the send signup email on registration?
    The other signup emails wont send the password.

    David
  3. forexincomemap

    forexincomemap New Member

    Joined:
    Apr 25, 2012
    Messages:
    2
    Hi David, thanks for the reply, it helped to figure it out! Basically, we were using this option:

    Send Signup E-Mail once FIRST subscripton is completed

    But we needed to use the following option as it is the only one that will send the password to users as you outlined:

    Send Registration E-Mail once customer completes signup form (before payment)

    also ticked:

    Send Registration E-Mail when user is created from aMember CP
    send email when user is created manually from aMember CP

    Now users get the password sent via email after completing their purchase.

    Thank you very much! :)
  4. xindexer

    xindexer Member

    Joined:
    Apr 17, 2011
    Messages:
    52
    These options have been removed in V 4.2 - why? I need to send the registration email out when I enter create a user via code. Not the signup email - the registration one.

    You have removed the options in the /library/Am/Form/Setup/Standard.php file

    How do I get this functionality back?

    I'm creating a user using this:

    PHP:
    $userrecord =Am_Di::getInstance()->userRecord;
    $userrecord->setForInsert( array( "login"=>$login.rand(0,30), "email"=>$email"status"=>1"name_f"=>$firstName"name_l"=>$lastName) );
    $userrecord->generatePassword();
    $userrecord->insert();
    and when this executes, I want the regristration email sent with the generated password to the user.
  5. xindexer

    xindexer Member

    Joined:
    Apr 17, 2011
    Messages:
    52
    After some digging through the code, I was able to find a solution:

    $user->sendRegistrationEmail(); (this needs to be called before $user->insert())

    PHP:
    $userrecord $di->userRecord;
    $userrecord->setForInsert( array( "login"=>$login"email"=>$email"status"=>1"name_f"=>$firstName"name_l"=>$lastName) );
    $userrecord->generatePassword();
    $userrecord->sendRegistrationEmail();
    $userrecord->insert();
  6. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    It was not deleted and must be available at aMember CP -> Setup -> E-Mail : Signup Messages : Send Registration E-Mail

Share This Page