0
Welcome Guest! Login
0 items Join Now

Name vs Username question

  • Name vs Username question

    Posted 15 years 8 months ago
    • I am trying to setup a chat room in Affinity and have a question that someone can answer.

      Code for inserting the User name is placing Real Name instead of the User Name.

      <?php
      $user =& JFactory::getUser();
      if ( $user->get('id') ) {?>
      <script language="JavaScript">
      <!--
      var userName = "<?php echo $user->get('name');?>";
      var userID = "<?php echo $user->get('id');?>";
      var roomID = "Lobby";
      // -->
      </script>

      How can I change this so it gets the Username?

      Appreciate any help

Time to create page: 0.058 seconds