Allow role to edit users at lower level with only specific metadata

How to allow a custom role, company-administrator, to be able to edit/create/delete users lower than their level, subscriber, where some metadata is matched? To elaborate: I’m making a membership site and would like to have a user role which can administer users for their company/organisation only. So, I was thinking to create an email domain … Read more

get_usermeta() deprecated in favor of get_user_meta(). But why doesn’t it make use of it?

While coding WP I just wondered about this simple fact: get_usermeta() is deprecated since version 3.0. The warning suggests me to use get_user_meta(). Even the parameters are pretty similar, I wonder why the deprecated function is not making use of the new function as well. Isn’t that a sign that the new function does not … Read more

update_user_meta doesn’t work with AJAX

I try to keep user subscription in a metadata var. The function is called by AJAX. Ahe AJAX is called but the metadata does not seem updated on frontend. Here is the code: jQuery <script type=”text/javascript”> jQuery(document).ready(function($) { $(‘#tags_list a’).click(function(){ myid = $(this).parent(“li”).attr(‘id’); $.post( ‘<?php echo admin_url( ‘admin-ajax.php’ ) ?>’, { ‘action’: ‘change_subscription’, ‘type’: ‘post_tag’, … Read more