Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Members Page 1.2.1 bug
Stash
✭
Using Members Page 1.2.1 I get the following bug. When a new user applies for membership, if you have New member role set to Applicant, before you have accepted them, they show up as Administrator. Once they are accepted they show up properly as a member, as you would expect.
0
This discussion has been closed.
Comments
$getrole = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder'); $getrole->SetMainTable('Role','r'); $getrole->AddSelect(array('Name'), 'r'); $getrole->AddWhere('r', 'RoleID', '', $rows['RoleID'], '='); $getrole = $Context->Database->Select($getrole, 'MembersListRoles', 'MembersListTableRoles', 'An error occurred while grabbing the member roles.'); while($grRows = $Context->Database->GetRow($getrole)) { $role = $grRows['Name']; } Somewhere in there add a check for a new applicant. I will look at it later today but a gotta leave real soon.
I've also noticed that you can make this a publicly viewable page. However, the emails are displayed as plain mailto: links which would be a spammer's paradise. So, until there is some kind of obfuscation on these addresses I highly recommend no one makes this list public.
yea I just go in and manually add a period for there last name so that it renders correctly
(this lets only UserID "0" view it AKA the first person to register or the Admin. U would need to use permissions to allows roles.)
$fullposts = $rows['CountDiscussions'] + $rows['CountComments']; if($rows['UtilizeEmail'] == 1) { $checkedemail = '<a href="mailto:'.$rows['Email'].'">'.$rows['Email'].'</a>'; }
like this:
$fullposts = $rows['CountDiscussions'] + $rows['CountComments']; if($rows['UtilizeEmail'] == 1 || $Context->Session->UserID == 0) { $checkedemail = '<a href="mailto:'.$rows['Email'].'">'.$rows['Email'].'</a>'; }
I found the code on line 85 inside the extension. After adding what you recommended, and uploading the modified default.php file, nothing has changed. I am still showing N/A for all email addresses when I click on the Member tab.
/*Modified line 85 */ if($rows['UtilizeEmail'] == 1 || $Context->Session->UserID == 0) { $checkedemail = '<a href="mailto:'.$rows['Email'].'">'.$rows['Email'].'</a>'; } else { $checkedemail = 'n/a'; }
What am I missing?
I can now see all member emails on the Member tab. I guess this means that I am user id1 (as admin). But if I am user id1, then who is user id0?
Where can I find user ID #'s?
I changed it back to
$Context->Session->UserID == 1
Working wonderfully, thanks.