Thanks Dulabs for the help.
To fix this error use this code below
global $wp_version;
if(!(function_exists('get_user_to_edit'))){
require_once(ABSPATH.'/wp-includes/user.php');
require_once(ABSPATH.'/wp-admin/includes/user.php');
require_once(ABSPATH.'/wp-includes/registration.php');
}
That should fix it!