• Resolved gamicord

    (@gamicord)


    My Business Logic involves Referral— where I expect people to refer other people to buy from me, then I offer 15% Commission of the deal to the person who referred client to me.

    To get this Logic to work, I need to generate a Unique Identification Number for each person who registers on my website.

    This problem has been raised in Stack Exchange in about 10 Years ago, as can be seen here:
    https://wordpress.stackexchange.com/questions/65738/create-unique-id-for-user

    1a) I need the same thing. Is this possible with User Registration Registration Form?

    1b.) If not possible, can you Please help me with PHP Code Snippets that can make it possible?

    2.) When the Unique ID of each member is generated, I will like to display it on the User’s Profile Page.

    How can I achieve this?

    Needing to hear from you soon.

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @gamicord,

    It is not possible to generate the different pre-formatted unique IDs and validate them during the registration. Still, during registration, the user registration form registers users with a unique user ID. You can get that unique id to display on your front pages using the following code snippet.

    <?php $user_id = get_current_user_id(); echo 'User ID: ' . $user_id; ?>

    Regards!

    Thread Starter gamicord

    (@gamicord)

    1.) Thanks for your reply. It seems to suggest to me that there is some light at the end of the tunnel.

    Now, I need a shortcode to help me display this auto-generated Unique User ID, on the User Profile Page.

    Would you be able to provide me the shortcode to achieve that?

    2.) I am not too Technical. I just started Learning Python, JavaScript and PHP.

    However, I have been able to get a PHP Code Snippet from somewhere. 

    Here’s the link to the Code file:

    https://drive.google.com/uc?export=download&id=1L18nTfh9DVkQncyxi-TlkOCVTrWyOL_I

    What I need you to do, is to help me modify the Code to fit into your User Registration plugin.

    So that when I install User Registration plugin, the function of creating Custom User ID will be available to me during the Registration process, using User Registration plugin.

    Would you Please help me do that?

    Needing to hear from you soon.

    Regards

    Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @gamicord,

    We would like to clarify some points regarding our platform. This platform serves as a means for user registration and free plugin support. If any users encounter difficulties in configuring the plugin or come across any issues, we are here to provide assistance.

    However, please note that our support service does not offer customization services for your specific features. If you wish to display the user ID using a shortcode, you can utilize the following code snippets.

    function user_id_shortcode() {
    $user_id = get_current_user_id();
    return 'User ID: ' . $user_id;
    }
    add_shortcode('user_id', 'user_id_shortcode');


    Now you can use the [user_id] shortcode anywhere in your WordPress content editor or within PHP code in your theme files to display the current user’s ID.

    Regards!

    Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Since we did not get a response from your end, we are marking this thread as resolved, as we believe the things mentioned here are now resolved. Please create a new support thread if needed.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘User Unique Registration Number’ is closed to new replies.