HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Username ( _ ) error

If users has an underscore in their nickname they can't use the banner function. It gets the "Whoops, can't find user"

Instead of "user_name" it gets "user-name" in the URL. I guess that's why it's not working there.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Without looking at the code, I am assuming the profile name is getting passed through the URL function which replaces special symbols with a -.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    fonchi
  • public function ProfileController_AfterAddSideMenu_Handler($Sender) { $SideMenu = $Sender->EventArguments['SideMenu']; $BannerUserID = Gdn::Session()->UserID; $IsAdmin = Gdn::Session()->CheckPermission('Garden.Users.Edit'); if (($Sender->User->UserID == $BannerUserID) || ($IsAdmin)) { $SideMenu->AddLink('Options', T('Banner de Usuario'), '/profile/userbanner/' . $Sender->User->UserID . '/' . Gdn_Format::Url($Sender->User->Name), FALSE, array('class' => 'Popup')); } }

    Will that be the one?
    Any idea how can it be fixed @hgtonight ?

  • hgtonighthgtonight ∞ · New Moderator

    Change line 94 to $Sender->GetUserInfo($BannerUserID, $BannerUserName, $BannerUserID);.

    Then comment out lines 90 and 92.

    Let me know if that works.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    fonchiBleistivt
  • It worked!!!
    Thanks @hgtonight for your time.

Sign In or Register to comment.