I was looking to change the "Wordpress" name in all of my sent mail. In the past I have customized my Wordpress backend to display my desired email. But I have downloaded a new plugin that has altered the email name field. I went to attempt to change it again but this time in the pluggable.php template file.
However things did not go as planned now I have a fatal error:
Fatal error: Call to undefined function _fill_user() in /home/content/61/7791761/html/Portal/wp-includes/pluggable.php on line 199
I need to fix this seems as though it has something to do with the $wpdb variable
/**
* Retrieve user info by a given field
*
* @since 2.8.0
*
* @param string $field The field to retrieve the user with. id | slug | email | login
* @param int|string $value A value for $field. A user ID, slug, email address, or login name.
* @return bool|object False on failure, User DB row object
*/
function get_user_by($field, $value) {
global $wpdb;
switch ($field) {
case 'id':
return get_userdata($value);
break;
case 'slug':
$user_id = wp_cache_get($value, 'userslugs');
$field = 'user_nicename';
break;
case 'email':
$user_id = wp_cache_get($value, 'useremail');
$field = 'user_email';
break;
case 'login':
$value = sanitize_user( $value );
$user_id = wp_cache_get($value, 'userlogins');
$field = 'user_login';
break;
default:
return false;
}
if ( false !== $user_id )
return get_userdata($user_id);
if ( !$user = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->users WHERE $field = %s", $value) ) )
return false;
_fill_user( $user );
return $user;
}
endif;