Tag Info

Hot answers tagged

2

I believe Crazycoolcam spelled the table incorrectly, user_meta vs usermeta. You may also want to define the else case, what happens if the table is not user. Try this: <?php $wpdb->add_database(array( //Connect to Users Database 'host' => DB_HOST, // I am using the same host for my two DBs 'user' => DB_USER, ...


1

The problem is that when you pass the $key argument on get_user_meta() function, you don't pass a valid argument. The $key must be a string according to the documentation page. It represents the value of meta_key in the wp_usermeta table. If with wpcf-client-lvl is actually a variable that contains the name of the field ( lets say $wpcf-client-lvl = ...


1

Well, you comparing the results of the email_exists function with $current_user->ID. If email exists, email_exists() return the ID of the user using that email or false if the email doesn't exists. Imaging you are checking a email not being using, email_exists() return false and this if will validate: elseif(email_exists(esc_attr( $_POST['email'] ) ) != ...


1

Take a look at PHP's array_values function. Alternatively, you could typecast. Note that if the array is in serialized form as you have put it above, you will have to unserialize it first, in either case. $numerical_array = array_values( unserialize( 'a:1:{s:8:"post-134";s:3:"134";s:8:"post-136";s:3:"136";}' ) ); or $numerical_array = ...


1

I think you will require to custom develop some part of it but most of it can be done with Contact Form 7 plugin. You can create forms with upload fields very easily in Contact Form 7. And you can make it visible for loggenin users only like this. <?php if ( is_user_logged_in() ) { echo do_shortcode('[contact-form-7 id="91" title="Form"]'); ...


1

Your code does work. It's just that you are declaring $xfield_args after you have made the call xprofile_insert_field( $xfield_args ); it should look like this add_action('bp_init', 'field_xprofile_twitter'); function field_xprofile_twitter() { global $bp; $xfield_args = array ( field_group_id => 1, name => ...



Only top voted, non community-wiki answers of a minimum length are eligible