@klenshop
I have changed the code for #year# and now replacing these characters within the prefix.
So how do I implement that to have the year at the end of the ID say ‘-24’ @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 and
GAND-24-SM`
So i did this GAND-FM- : random : 10000-#year#
but the year didnt work. @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.
Great that works. Thanks @missveronicatv much grateful for the time
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.
@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
-
This reply was modified 5 months, 2 weeks ago by missveronica.
-
This reply was modified 5 months, 2 weeks ago by missveronica.
@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
@enkoes
Plugin will automatically add one more digit 100000, 100001, 100002
@missveronicatv oh… understood. 🙂
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