6 Replies Latest reply on Mar 20, 2014 5:00 AM by bergerle

    Determining if a user is not logged in ...

    ronanfeely

      Hello,

       

      I'd like to determine if a user is not logged and bring up a "Please Register" box in a HTML widget if they are not. If they are I personalize some content in the HTML box for them.

       

      So I can do this to get their display name.

       

      var currentuser = window.parent._jive_current_user.displayName;

       

      But what's the default status of the username if they're not logged in? This doesn't work:

       

      if (currentuser != " ") {

      document.write("do something");

      }

       

      Nor does this:

       

      if (currentuser != "") {

      document.write("do something");

      }

       

      Any help most appreciated.

       

      R.