Support » Plugin: Ultimate Member - User Profile & Membership Plugin » user_exists_by_id not working

  • Resolved Eibe

    (@eibe96)


    Hello,

    I have been trying to create a standalone php page that allows me to check if a certain user_id exists. I have first tried to use GET, but it was not working, then I tried to put a random ID in from the get go to see if it would work (it doesn’t). It doesn’t work regardless of the existance of the ID being checked. Furthermore, no code below that line is executed, which leads me to believe that line has an error.

    Am I missing something?
    I have the latest version of Ultimate Member installed.

    
    <?php
    $boolean = $ultimatemember->user->user_exists_by_id( 21 );
    if ( $boolean ) {
    echo "ABC";
    }
    ?>
    

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • SuitePlugins

    (@suiteplugins)

    That script seems to be for Ultimate Member versions prior to 2.0

    Use this instead

    UM()->user()->user_exists_by_id( $user_id );

Viewing 1 replies (of 1 total)
  • The topic ‘user_exists_by_id not working’ is closed to new replies.