1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 how to show code only to those who have been MANUALLY validated

Discussion in 'Styling and Customization Questions' started by zoldos, Sep 28, 2016.

  1. zoldos

    zoldos Well-Known Member

    I'm trying to restrict Cometchat to those who have already been MANUALLY validated, and no one else. How can this be done? I tried various things without success. Any help, or suggestions would be appreciated! Thanks!
  2. zoldos

    zoldos Well-Known Member

    Hmm...after a bit of research, looks like any state other than "valid" receives permissions from group 1 (unregistered).

  3. zoldos

    zoldos Well-Known Member

    Hmm....still not working. I disabled Cometchat via usergroup permission and also put this in PAGE_CONTAINER:

    <xen:if is="!{xen:helper ismemberof, $visitor, 1}">
    <link type="text/css" href="/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
    <script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>

    It does NOT work and it still shows to members who have NOT yet been manually approved.

    Help please!
  4. Pierce

    Pierce Active Member

    Make a new group.

    Then add only those users you approve to see code.

    That would be better.

    The permissions for the group can be the far left ( no ?)for everything as your custom coding it :)
    zoldos likes this.
  5. zoldos

    zoldos Well-Known Member

    Hmm....well I have 1350+ approved members so manually assigning each of them to a new custom group would be very tedious. I do already have a custom group that all approved members are part of. I'll tinker some more!

  6. zoldos

    zoldos Well-Known Member

    Still can't figure it out. :(
  7. Pierce

    Pierce Active Member


    So Can you elaborate more on what manually validated is? Vs automatically?
  8. zoldos

    zoldos Well-Known Member

    Certainly. My forum is set to allow registrations, but I also set it so I have to "validate" any new accounts so all new registrations are in the state "Awaiting Approval".

    I want to show certain code only if a user is NOT in the state "Awaiting Approval".

    Is there is a conditional for "is Awaiting Approval"?

  9. Brogan

    Brogan XenForo Moderator Staff Member

    If you are referring to users which appear here: admin.php?users/moderated

    That would be a user state of moderated.
  10. zoldos

    zoldos Well-Known Member

    Which is? :D
  11. Brogan

    Brogan XenForo Moderator Staff Member


    However, I suspect what you actually want to use is user_state.valid.
  12. zoldos

    zoldos Well-Known Member

    I tried: <xen:if is="{$user.user_state} == 'valid'"> and still doesn't work. Can you please elaborate?
  13. Brogan

    Brogan XenForo Moderator Staff Member

  14. zoldos

    zoldos Well-Known Member

    I can't make any sense of it. Is the variable in question available in template PAGE_CONTAINER?
  15. Brogan

    Brogan XenForo Moderator Staff Member

    The guide explains exactly how to check that.
  16. zoldos

    zoldos Well-Known Member

    Okay thanks!
  17. Hi Zoldos,

    If you have a valid license please raise support ticket using the following link and someone from the support team will help you with the issue.



    zoldos likes this.
  18. zoldos

    zoldos Well-Known Member

    I do have a Cometchat license, but support has expired. :(

Share This Page