Signup helper hooks confusion

Discussion in 'Customization & add-ons' started by criswell, Mar 27, 2007.

  1. criswell

    criswell New Member

    Joined:
    Mar 27, 2007
    Messages:
    1
    I've been working on an LDAP plugin for aMember and what I've come up with mostly works, however, I am encountering some problems that I thought would have been handled by the signup helper hooks listed here.

    What's happening is this:

    We have existing accounts already in LDAP. We want the existing users to be able to sign up in aMember, creating new users in aMember using their same username and password from LDAP. If they do not use the same username/password combination, we want aMember to not allow them to sign up.

    If the users use the same username/password combination, everything goes as plan and the plugin works.

    However, if they use the wrong username/password combination, aMember allows the user creation and we wind up with a broken account (broken in the sense that there is a discrepancy between aMember and LDAP.)

    From the signup helper hooks link above, I found the 'check_uniq_login($login, $email, $pass)' helper hook, and I thought this would solve our problem.

    However, I can't seem to get aMember to ever call this function. I've filled my code with debugging statements to verify this but this particular hook never seems to be called. I would assume it would be called after the user fills in the new user signup form but before the user is added to aMember, but it doesn't seem to be.

    Here is the setup_plugin_hook from my code:

    if (!check_setup_ldap()){
    setup_plugin_hook('subscription_added', 'ldap_added');
    setup_plugin_hook('subscription_updated', 'ldap_updated');
    setup_plugin_hook('subscription_removed', 'ldap_removed');
    setup_plugin_hook('subscription_rebuild', 'ldap_rebuild');
    setup_plugin_hook('check_uniq_login', 'ldap_check_user_pre_signup');
    }

    The function ldap_check_user_pre_signup function exists.

    What am I doing wrong with check_uniq_login? Am I misinterpreting when and how this hook is called?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    I'm sorry for mistake in documentation! The hook name is
    subscription_check_uniq_login
  3. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Criswell,

    Did you ever get your LDAP plugin working?

    Skippy

Share This Page