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

StashStash
edited January 2007 in Vanilla 1.0 Help
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.

Vanilla, extensions, members_page, bugs, 2007-01-19_10-45-45, Applicant

Vanilla, extensions, members_page, bugs, 2007-01-19_10-48-23, Member

Comments

  • Well i am guessing this will happen in my friends extension also.

    $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.
  • Thanks y2kbg, look forward to a fix :)

    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.
  • Rather interestingly, when I activated the Applicant Email Verification 0.4.1 extension, the Applicant now shows up as a Member! Again, this is before I have accepted the application. Most strange...
  • y2kbgy2kbg New
    edited January 2007
    yea in my Friends 1.7 I have added settings to disable columns on an individual bases. umm maybe I will automatically disable email on the public view, or add setting for public view, to disable columns for public but not a registered member. I am in a school class right now now but I will be thinking about a fix for his.
  • I think it also has to do with fields that are empty. I noticed that if you don't enter a last name, all the field values are moved to the left into their wrong columns.
  • @stash: are they not applicant anymore or is it just an error on the Member Page?
  • AFAIK its just an error on the Member page as they were still an applicant at the time. When I looked at their account in the core vanilla it said Applicant.
  • I think it also has to do with fields that are empty. I noticed that if you don't enter a last name, all the field values are moved to the left into their wrong columns.

    yea I just go in and manually add a period for there last name so that it renders correctly
  • StashStash
    edited January 2007
    Joe is active on the forum, so Joe, how about fixing this up for us a little? ;) I think we'd all appreciate it :)
  • Would be fantastic if Member Page displayed the email address of all members (on the member tab), instead of displaying N/A. http://lussumo.com/community/discussion/5019/member-count/
  • Specifically, jcb86 means for Administrators (or roles with that permission) ;)
  • Yes. Thanks for clarifying that, Stash.
  • look thru and add an ''or'' to the extension "if" to this:
    (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>'; }
  • edited January 2007
    Y2bg, was your post directed to me, or to Stash?

    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?
  • is you user id 0? try changeing "$Context->Session->UserID == 0" to "1==1" and see if it works then.
  • edited January 2007
    Thanks, that works! The "1==1" did the trick.

    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?
  • ok but the 1==1 will allow all people to view it, i just had a Duh moment so change backto "$Context->Session->UserID == 0" but use "$Context->Session->UserID == 1" sorry, in another forum I use userid starts at zero. so now this should work.
  • Hey, no problem, y2kbg. You're one of the most helpful people on this forum.

    I changed it back to
    $Context->Session->UserID == 1

    Working wonderfully, thanks.
This discussion has been closed.