2. I am generating two different forms for two different people and I want their USER IDs to be different since they are two different groups. How do I implement that using the code I got your the docs
@klenshop
1. You can try this code snippet for a “show password” eye
add_filter( "um_confirm_user_password_form_edit_field","um_user_password_form_edit_field", 10, 2 );
add_filter( "um_user_password_form_edit_field","um_user_password_form_edit_field", 10, 2 );
function um_user_password_form_edit_field( $output, $set_mode ){
ob_start();
?>
<div id='um-field-show-passwords' style='color: white !important; text-align:left;display:block;'>
<i class='um-faicon-eye-slash'></i>
<a style="color: white !important;" href='#'>Show or hide password</a>
</div>
<script type='text/javascript'>
jQuery('#um-field-show-passwords a').click(function(){
jQuery(this).parent("div").find("i").toggleClass(function() {
if ( jQuery( this ).hasClass( "um-faicon-eye-slash" ) ) {
jQuery( this ).parent("div").find("a").text('Hide password');
jQuery( this ).removeClass( "um-faicon-eye-slash" )
jQuery(".um-form").find(".um-field-password").find("input[type=password]").attr("type","text");
return "um-faicon-eye";
}
jQuery( this ).removeClass( "um-faicon-eye" );
jQuery( this ).parent("div").find("a").text('Show password');
jQuery(".um-form").find(".um-field-password").find("input[type=text]").attr("type","password");
return "um-faicon-eye-slash";
});
return false;
});
</script>
<?php
return $output . ob_get_clean();
}
Install the code snippet into your active theme’s functions.php file
or use the “Code Snippets” plugin.
https://ww.wp.xz.cn/plugins/code-snippets/
2. You can try this new plugin “UM Unique User Account ID”
https://github.com/MissVeronica/um-unique-user-account-id
Alright. Have seen you just coded. Very grateful for that. I will take a look and get back to you
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
@missveronicatv
I just realised that, if I change the membership, the user ID does change along. Thus from the plugin you gave. Is there anyway you can help?
@klenshop
Can you explain how you “change the membership”?
From what we have, the user ID is based on the membership that the user registered with. So each membership have a specific User ID. But when the user membership changes, the user ID doesn’t change. eg
first membership starts with GK
second membership starts with JK
I want the user member ID to change if the membership also changes.
@klenshop
How do you change the Membership level by an Admin, from frontend or backend?
Do you have an UM field defining the membership level?
I change it at backend. But users can also change through updrade
Yes, there is UM field for membership level
I change the membership using the user role
@missveronicatv Any help on that please?
@klenshop
Yes I have made a new plugin which is a duplicate of your current plugin
but using Role IDs instead of Form IDs for the unique ID.
You must use both plugins.
Copy the formatting rules and replace Form IDs with UM Role IDs.
Set the meta-key for unique membership ID to um_unique_account_id
https://github.com/MissVeronica/um-unique-membership-id
@missveronicatv can you please elaborate more. Not to clear. Read the readme file to but still not clear
@klenshop
Can you post your formatting rules for the GK and JK unique account IDs.