# User groups conditional display stopped working

**URL:** <https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196>\
**Category:** Support\
**Created:** [June 11, 2024, 3:50pm UTC](https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196 "2024-06-11T15:50:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilysmithcreate](https://avatars.discourse-cdn.com/v4/letter/e/278dde/32.png) [@emilysmithcreate](https://sygnal-attr.discourse.group/u/emilysmithcreate)\
**Post date:** [June 11, 2024, 3:50pm UTC](https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196/1 "2024-06-11T15:50:55Z")

</div>

1. Your project’s read-only link.  
[Webflow - Ither App](https://preview.webflow.com/preview/side-nerd-apps-afb0d5ad255b9b9818597d60?utm_medium=preview_link&utm_source=designer&utm_content=side-nerd-apps-afb0d5ad255b9b9818597d60&preview=52a07fde870588221ccef1c8c9a4eca3&pageId=65fc9d67d6535c77d835ffee&locale=en&workflow=preview)
2. A link to your published project  
[https://www.textither.com/](https://www.textither.com/)
3. Details on exactly where to look on your site for the problem you’re describing  
a) When the user logs in, a Manage User button takes them to user page  
b) there is conditional formatting to show the user management interface iframe according to what user group they are a member of:

 Conditional Visibility 

```
<script>
    // Initialize window.sa5 if it doesn't exist
    window.sa5 = window.sa5 || [];

    // Push the event listener to the array
    window.sa5.push(['userInfoChanged', (user) => {
        if (user.user_data_loaded && user.user_data_loaded.access_groups) {
            const iframeContainer = document.getElementById('iframeContainer');
            // Ensure to check the correct access group case-sensitive
            if (user.access_groups.includes('bifmc')) {
                // User is in the 'BIFMC' group, display the iframe
                iframeContainer.innerHTML = '<iframe src="bifmc retool link" width="100%" height="800px">';
            }
            if (user.access_groups.includes('psb')) {
                // User is in the 'BIFMC' group, display the iframe
                iframeContainer.innerHTML = "psb retool link" width="100%" height="800px">';
            }
            else {
                // User is not in the 'BIFMC' group, display an access denied message
                iframeContainer.innerHTML = '<p>You do not have access to edit the user group.</p>';
            }
        }
    }]);
</script>

```

I had this working about 10 days ago, tested it with different accounts and showed different formatting. Then a had my pilot user try it, not having thought anything changed, and it didn’t work for them. I tried a bunch of stuff that didn’t work, then reverted to my initial setup.

Here is my site head code:

---

<div class="post-metadata">

**Author:** ![emilysmithcreate](https://avatars.discourse-cdn.com/v4/letter/e/278dde/32.png) [@emilysmithcreate](https://sygnal-attr.discourse.group/u/emilysmithcreate)\
**Post date:** [June 11, 2024, 4:11pm UTC](https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196/2 "2024-06-11T16:11:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![memetican](https://yyz2.discourse-cdn.com/free1/user_avatar/sygnal-attr.discourse.group/memetican/32/9_2.png) [@memetican](https://sygnal-attr.discourse.group/u/memetican)\
**Post date:** [June 14, 2024, 1:03am UTC](https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196/3 "2024-06-14T01:03:13Z")

</div>

https://www.loom.com/embed/d90358279c9748138699193116873969

---

<div class="post-metadata">

**Author:** ![emilysmithcreate](https://avatars.discourse-cdn.com/v4/letter/e/278dde/32.png) [@emilysmithcreate](https://sygnal-attr.discourse.group/u/emilysmithcreate)\
**Post date:** [June 18, 2024, 2:58pm UTC](https://sygnal-attr.discourse.group/t/user-groups-conditional-display-stopped-working/196/4 "2024-06-18T14:58:44Z")

</div>

Thank you, that was the step I was missing, I appreciate it!

I had to remove the links from the html because it wouldn’t let me post my questions with more than 2 links that’s why the code didn’t make sense 😅
