Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lfbsilva

    (@lfbsilva)

    Paul, your work is incredible. Wonderful support. I will contribute to your project. Unfortunately there is a very big difference between the value of our coins and my financial collaboration will not be much for you, but it will be a way to pay some of the time you have dedicated.

    Thanks for all

    Thread Starter lfbsilva

    (@lfbsilva)

    Thank you, but in this case i must elevate role of users.

    I prefere do this,

    
    add_action('site-reviews/review/build/before', function ($review) {
        
        if (isset($review['assigned_users']) && count($review->assigned_users)> 0 ){
          um_fetch_user($review->assigned_users[0] );
          $review->set('avatar', um_get_avatar_uri( um_profile('profile_photo'), 40 ));
          $user_info = get_userdata($review->assigned_users[0]);
          $review->set('author', $user_info->display_name);
        } else {
            $review->set('author', 'Anonymous');
        }
          
        return $review;
    });
    

    Author was assigned correctly!!! But, avatar has not changed!
    Avatar url from UM is ok (i tested). But $review->set(‘avatar’, URL) not change the url.
    Shouldn’t it work the same way?

    Thread Starter lfbsilva

    (@lfbsilva)

    The ‘site-reviews/review/build/before’ is perfect!! Thank you!!

    The initial assign is ok (in the form). I do not have problems. But when i reassign (editing) the user do not change in review.
    Do I need to create a function to reassign one user and change the author info?

    Thread Starter lfbsilva

    (@lfbsilva)

    Another thing. If you assigned a user, why the author is not this user?
    Can i do this?

Viewing 4 replies - 1 through 4 (of 4 total)