Support » Fixing WordPress » flash – get username

  • hello!
    i need your help
    i’m making some site with my own flash games
    and these games should have some way to get username (now logging on)
    how i can do it?
    thanx

Viewing 4 replies - 1 through 4 (of 4 total)
  • See this Codex page for a list of user functions.

    Thread Starter nonparel

    (@nonparel)

    i try to make new file with name user.php (for example) with this code:

    <?php
    if ( is_user_logged_in() ) {
    echo ‘Welcome, registered user!’;
    } else {
    echo ‘Welcome, visitor!’;
    };
    ?>

    but when i call this file, this is nothing (file not found) 🙁

    You can’t just add a random file to a WordPress theme or to WordPress itself. You need to either create a function and add that function to one of your theme templates. Or add the code you want to use to just one of your theme’s templates.

    Thread Starter nonparel

    (@nonparel)

    it’s bad news for me 🙂
    thank you!

    so, as I understand, flash game on some page (was added by iframe) can’t get user name as some variable

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘flash – get username’ is closed to new replies.