WordPress.org

Ready to get started?Download WordPress

Forums

Simple Ajax Chat
[resolved] Default to logged-in user name (4 posts)

  1. lodestar
    Member
    Posted 1 year ago #

    Can I get the chat username to default to the WP (nick)name of the logged-in user? I already have the chat page accessible only to them. Thanks - Dick

    http://wordpress.org/plugins/simple-ajax-chat/

  2. lodestar
    Member
    Posted 1 year ago #

    Fixed it. It appears that the user nickname is referenced in simple-ajax-chat-form.php but not defined anywhere.

  3. Mazzaker
    Member
    Posted 1 year ago #

    Here my solution if somebody needs it:
    Edit simple-ajay-chat-form.php at line 80:

    <?php get_currentuserinfo();
           echo $custom_form_pre; ?>

    to:

    <?php global $current_user;
           get_currentuserinfo();
           $user_nickname = $current_user->display_name;
           echo $custom_form_pre; ?>

    Done.

  4. leegmiller
    Member
    Posted 6 months ago #

    thanks i wanted this :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags