Viewing 12 replies - 16 through 27 (of 27 total)
  • missveronica

    (@missveronicatv)

    @klenshop

    I have changed the code for #year# and now replacing these characters within the prefix.

    Thread Starter klenshop

    (@klenshop)

    So how do I implement that to have the year at the end of the ID say ‘-24’ @missveronicatv

    missveronica

    (@missveronicatv)

    @klenshop

    No, you can include #year# in your prefix like this
    GAND-SM-#year# or GAND-#year#-SM
    will give you GAND-SM-24 andGAND-24-SM`

    Thread Starter klenshop

    (@klenshop)

    So i did this GAND-FM- : random : 10000-#year# but the year didnt work. @missveronicatv

    missveronica

    (@missveronicatv)

    @klenshop

    New update again and now you can use GAND-FM- : random : 10000 : #year#
    and PHP code will give you -24 in addition to the random number.

    Thread Starter klenshop

    (@klenshop)

    Great that works. Thanks @missveronicatv much grateful for the time

    enkoes

    (@enkoes)

    Hi @missveronicatv I tested your plugin and found an issue:

    I have two roles sharing the same membership ID format:

    um_moderator : M#year#
    um_custom_role_2 : M#year#

    No. of digits: 5 (default)

    meta_key: um_unique_account_id

    When a user register as um_moderator, it generates M2400145-001 (I suppose if he register as um_custom_role_2, it will give M2400145-002). How can I get rid of “-001” or “-002”?

    Regards.

    missveronica

    (@missveronicatv)

    @enkoes

    You will get M2400145-001 if M2400145 is being used when Role is changed.
    If you use random for one ( or both ) of your Roles then a Role change will not be a duplicate.
    Set also min value for the random to 10000

    The 145 is the user_id which is not changed by UM with a Role change
    and you get the duplicate if both Roles will have same Membership IDs.

    With random used in the ID a new random number is generated if there is a duplicate.

    You cam also solve this conflict by not having M in both IDs

    enkoes

    (@enkoes)

    @missveronicatv thanks for your clarification.

    Another thing, just want to know if we set 5 digits, what happen (let’s say no random setting) if the user_id reach 99999? Will it roll back to 00001? Or will it automatically add one more digit 100000, 100001, 100002, …?

    Regards

    missveronica

    (@missveronicatv)

    @enkoes

    Plugin will automatically add one more digit 100000, 100001, 100002

    enkoes

    (@enkoes)

    @missveronicatv oh… understood. ??

    Plugin Support andrewshu

    (@andrewshu)

    Hi @klenshop

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Unique ID’ is closed to new replies.