Forum Replies Created
-
AuthorPosts
-
KhaledMember
Hello,
By default, custom email only works with UMP forms. However, please add following code to your functions.php to hook custom email with user_register action.add_action( 'user_register', 'umpRegistrationEmail' ); function umpRegistrationEmail( $user_id ) { global $userMeta; $user = new WP_User( $user_id ); $key = 'registration'; $data = $userMeta->getEmailsData( $key ); $role = $userMeta->getUserRole( $user->ID ); if ( empty( $data['admin_email']['um_disable'] ) ) { $mailData = @$data['admin_email'][ $role ]; $mailData['email'] = !empty( $data['admin_email']['um_all_admin'] ) ? $userMeta->getAllAdminEmail() : get_bloginfo( 'admin_email' ); $mailData['email_type'] = $key; $mailData['receipt_type'] = 'admin'; $mailData = apply_filters( 'user_meta_raw_email', $mailData ); $mailData['subject'] = $userMeta->convertUserContent( $user, @$mailData['subject'] ); $mailData['body'] = $userMeta->convertUserContent( $user, @$mailData['body'] ); $userMeta->sendEmail( $mailData, $user ); } if ( empty( $data[ 'user_email' ][ 'um_disable' ] ) ) { $mailData = @$data['user_email'][ $role ]; $mailData['email'] = $user->user_email; $mailData['email_type'] = $key; $mailData['receipt_type'] = 'user'; $mailData = apply_filters( 'user_meta_raw_email', $mailData ); $mailData['subject'] = $userMeta->convertUserContent( $user, @$mailData['subject'] ); $mailData['body'] = $userMeta->convertUserContent( $user, @$mailData['body'] ); $userMeta->sendEmail( $mailData, $user ); } }
KhaledMemberHello, Thanks for your purchase. Please send an email to support(at)user-meta.com with your site url.
KhaledMemberHello,
When an admin added any user, that user’s status will be automatically active regardless of settings. Most probably, you are trying to register user while you are logged on as admin same time 🙂Thanks.
February 20, 2014 at 1:57 am in reply to: Registration form with a biography field that contains text and hmlt #4868KhaledMemberRich text suppose to store its content as html. Please check Biographical Info field’s value from User >> Your Profile menu.
Thanks.
KhaledMemberHello,
You can put following codes to your functions.php
add_action( 'init', 'block_signup_header' ); function block_signup_header() { $file = basename( $_SERVER['PHP_SELF'] ); if ( in_array( $file, array( 'wp-signup.php', 'wp_register' ) ) ) { wp_redirect( home_url() ); exit(); } }
Thanks.
KhaledMemberOh, sorry!
Please replace
$res = get_user_meta($user_id, $info, false);
with
$res = get_user_meta($user_id, $info, true);
Thanks.
KhaledMemberSounds good 🙂
KhaledMemberHello,
Please use username field instead of email, and you can rename field title to email. You can configure login by email from User Meta >> Settings (Login Tab).
Thanks.
KhaledMemberHello,
Put following codes to your functions.php
add_action( 'admin_init', 'blockDashboard' ); function blockDashboard() { if ( ! current_user_can( 'manage_options' ) ) { wp_redirect( site_url() ); exit(); } }
These code will prevent non-admin to access wp-admin area.
Thanks.
KhaledMemberHello,
add_action( 'user_meta_after_form', 'toggleRoleBasedFields' ); function toggleRoleBasedFields( $formName ) { //if ( 'Your_Form_Name' != $formName ) return; echo " <script> jQuery(document).ready(function() { jQuery(\"input[name=role]\").change(function(){ roleName = jQuery(\"input[name=role]:checked\").val(); if(roleName=='tourist'){ jQuery(\".class_to_hide\").hide(); jQuery(\".class_to_show\").show(); } }); }); </script> "; }
Those code may be helpful for you. class_to_hide and class_to_show are name of classes that you want to hide or show, you can assign custom class name to any field via User Meta >> Fields Editor.
Thanks.
KhaledMemberHello Robert,
You could use something like that:
function payment_methods_func() { extract( shortcode_atts( array( 'info' => 'seller_payment_methods', ), $atts ) ); $user_id = get_current_user_id(); $res = get_user_meta($user_id, $info, false); if ( is_array( $res ) ) return implode( ', ', $res ); return $res; } add_shortcode( 'payment_methods', 'payment_methods_func' );
implode( ‘, ‘, $res ) will separate array value by comma.
Thanks.
KhaledMemberHi,
You can download Development Version from http://user-meta.com/downloads/
We have already applied fixes on it.Thanks.
KhaledMemberHello Robert, Your post may be overlooked, sorry for that.
1. If you use get_user_meta to retrieve checkbox value, it will return an array with the corresponding value.
2. Go to User Meta >> Fields editor, expand your country field. There is a dropdown named “Save meta value by”,select country name and hit save.
Thanks.
KhaledMemberHello,
Thanks for your reporting.
1. We have fixed this on dev version and will apply that fix on next release. In the meantime, you can use Development Version.
2. All user data on WP are shared among the whole network as WP use same database table to store and retrieve user data. So, since version 1.1.5 rc2, we have decided to store all user data in the same place. And it is also good for locating file reference under network.
-
AuthorPosts