Sub-accounts by Waindigo [Deleted]

Hi @Waindigo. Found another inheritance issue with this.

I don't normally have it setup on my forum, so never noticed it before. But subaccounts currently inherit the user banner of the parent account. This is happening even though the "Sub-account inherits user groups from parent" and "Sub-account inherits user group styling" are both disabled.
 
Code:
<xen:if is="{xen:helper ismemberof, $user, 13}">
    <div class="backImg99" />
<xen:elseif is="{xen:helper ismemberof, $user, 10} "/>
    <div class="backImg5" />
<xen:elseif is="{xen:helper ismemberof, $user, 9}" />
    <div class="backImg6" />
<xen:elseif is="{xen:helper ismemberof, $user, 8}" />
    <div class="backImg4" />
<xen:elseif is="{xen:helper ismemberof, $user, 7}" />
   <div class="backImg3" />
<xen:elseif is="{xen:helper ismemberof, $user, 6}" />
    <div class="backImg2" />
<xen:elseif is="{xen:helper ismemberof, $user, 14}" />
    <div class="backImg98" />       
<xen:else />
    <div class="backImg1" />
</xen:if>

Going from this. If the "main" account is in group 6, all works as expected. Nodlehs (8) and Spawn (10) are good. View attachment 77031

Main account at 7, again, works as expected.
Main account at 8, again, works as expected.

Now... once hitting group 9 with the main, Nodlehs(8) changes, Spawn (10) is normal. View attachment 77034

If I change Nodlehs and Spawn both to hero (6), everything I change the main account (which is still 9) to displays in their backgrounds.

(Group 9)............ (Group 7)
View attachment 77037 ........................View attachment 77038

At this point, any help would be appreciated. If anyone reading this can help, that would be awesome. I have about $20 in PayPal I can throw to someone to get this sorted.
Want to personally than Jon for his help.

His add-on wasn't the issue
.

My conditionals were. I appreciate him helping me and showing me a much better way to use them. All working now... and my head isn't hurting quite as much.
Out of curiosity, what was your solution to this? This behavior keeps coming and going for me, and I can't work out why.
 
Out of curiosity, what was your solution to this? This behavior keeps coming and going for me, and I can't work out why.

My conditionals just needed correcting. It's posted somewhere either in this forum, or at XenAdmins... not sure which. Plus, I think Jon actually helped me sort through the issues, which was a plus.
 
Jon, for whatever reason, this has stopped working in the RC series.

I can still create a new sub-account, however, attempting to log in, it simply won't. I can log in like normal with the newly made account. But making an account, then going and using "Login as User" stops it from connecting somehow.
 
Hi @Waindigo. Found a small bug recently. When looking at the full list of a user's subaccounts, the wrong account name is being pulled into the header.

6a99da2fbec1d04f1507f7752048bebc.png

That should say "Characters of Rani". Instead, it's pulling the name of one of the user's subaccounts.
 
Hi @Jon W. So, I'm still having trouble with subaccounts apparently adopting traits of the parent account. I've installed subaccounts on a brand new forum and this is still an issue.

All of the permissions seem to be correct, and the accounts in question have the appropriate usergroups assigned. The problem comes when I try to use the xen:helper ismemberof template code.

Code:
<xen:if is="{xen:helper ismemberof, $user, 3}">
             <img src="http://fracturerp.com/styles/fracture/themeImages/group_admin.png">
</xen:if>

My parent account is in the Administrator group (group 3) as a secondary usergroup. My subaccount is not. It's only in the registered usergroup currently as it's primary usergroup.

However, using that code again, both my parent admin account, and my subaccount end up with the same graphic.
 
Oh, nope, not just the "ismemberof" function. Just any secondary groups I try to pull.

I now have this in my message_user_info template:
Code:
{$user.username} - {$user.secondary_group_ids}

It outputs this:
Rani - 3
Bart Allen - 3
Mako - 6
Ralph Dibny - 6

This is what's in my actual database:
username
user_group_id secondary_group_ids
7aab8bed052e43bd322a041810b0aad6.png


The "Rani" and "Mako" accounts are the parent groups. Bart Allen is subaccount to Rani and Ralph Dibny is subaccount to Mako.
 
Is there a way to not display sub-accounts on a user's profile page? I'm looking to use this to allow people to separate accounts when they don't want to tie things to their main account in the context of support/recovery stuff, so if someone makes an account in order to post about something, I don't want anyway for (non-admin) users to tie it to the parent account. I'm not sure if there's anything tying them to the parent other than the links on the profile page, though.

Edit: I could do this for the link I found using the template editor:

waindigo_member_view_sidebar_subaccounts:

<xen:if is="{$visitor.is_admin} OR {$visitor.user_id} == {$user.user_id}">

This seems to work, but I don't know whether there's other leakage. (Not even kidding, information leakage between accounts could endanger people.)
 
Last edited:
Huh. That's interesting. Someone made a sub-account... and it says "administrator" on that account. I don't quite see why. They don't have admin permissions that I can see, but the account's profile page says "administrator".

EDIT: It appears I had misunderstood a setting, and it was granting groups to sub-accounts rather than allowing those groups to have sub-accounts, but this is now fixed. Whee.
 
Top Bottom