customization – Problems with WP 6.1.1 and the get_user_meta() function

Question

On upgrading from v6.0.3 to v6.1.1, the function get_user_meta() (used in my theme) is not working correctly!

In the following code v6.1.1 returns $guid as an empty value, however when I revert back to v6.0.3 all works as expected and $guid is correct (obviously for the same $memberCode)!

In both cases, $user is returned correctly.

    $user = get_user_by( 'login', $memberCode );

    if($user != false){

        //Get the guid of this user
        $guid = get_user_meta($user->ID, 'guid', true);

Any pointers to what the problem could be or how to solve it?

Thanks

0
Evan Camilleri 2 months 2022-12-08T13:23:34-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse