joeinc
Forum Replies Created
-
Hello @mlchaves and thank you! That does work but is there any code I can add to my functions so that when I use the Login & Back setting I can send the user to a custom login page such as /log-in
Thank you
Thanks @wpusermanager, I can get the current value of a user’s ACF field using this $user->site_name (site_name being the name of the ACF field) but if I put ‘site_name’ in the $field_keys_to_alert array and then change the value using the account page I don’t seem to receive an email alert at all. Not too sure what else to try for this
Thanks for your reply @mkesteban08 I did try to add both the ACF field names and the field key to the below but neither seemed to work, do you have any ideas?
$field_keys_to_alert = array( 'wpum_custom_field', );
Thanks @mkesteban08, I managed to get that to work using the $user->field_name
so E.g. if I had an ACF field with the name job_title, $user->job_title
Forum: Plugins
In reply to: [Enable Media Replace] File not updating after cache clearedThank you Gerard, this was very helpful. Problem fixed!
Thanks for the help, I am now using the below code but like you said it breaks the other build in user queries like by name and email address
Here is the code
function search_by_users_query($query) { global $pagenow; if (is_admin() && 'users.php' == $pagenow) { //Remove trailing and starting empty spaces $the_search = trim($query->query_vars['search']); $the_search = trim($query->query_vars['search'], '*'); $query->set('meta_key', 'company_name'); $query->set('meta_value', $the_search); $query->set('meta_compare', 'LIKE'); $query->set('search', ''); } } add_action('pre_get_users', 'search_by_users_query', 20);