1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Prevent Gender Change

Discussion in 'Add-on Releases [Archive]' started by James, May 31, 2011.

  1. James

    James Well-Known Member

    This modification will prevent users from changing their gender once it has been set.

    If a user's gender is unspecified, the user will be allowed to change their gender. Once a gender is specified (either male/female) the user cannot change their gender at all.

    Installation Instructions
    • Download the attached zip file
    • Upload the library folder to your XF root
    • Install the addon-NoGenderChange.xml by going to ACP -> Install Add-on
    Uninstallation Instructions
    • Uninstall the Prevent Gender Change add-on from your ACP -> List Add-ons
    • Delete the NoGenderChange directory from the library directory
    This add-on uses one phrase named NoGenderChange_cannot_change_gender_once_set which you are free to edit at leisure.
    Feedback is appreciated!

    Enjoy :)

    Attached Files:

    maszd, cinoss, Fuhrmann and 12 others like this.
  2. Shelley

    Shelley Well-Known Member

    Very nice james. Good job. (y)
  3. James

    James Well-Known Member

    Can someone confirm this bug with this mod enabled:
    Changing/Adding/Deleting Identity Services doesn't work.

    I've experienced it on my install, looking at a fix but I'm baffled atm!
  4. Peggy

    Peggy Well-Known Member

    Could be awkward if they actually do change gender. o_O

    Just sayin....
    Fuhrmann, fos, James and 1 other person like this.
  5. Panupat

    Panupat Well-Known Member

    So I'll remain male for the rest of my life?

    Fuhrmann and Vodkaholic like this.
  6. Peggy

    Peggy Well-Known Member

    Were you thinking about changing?? :cautious:
    Fuhrmann likes this.
  7. Wuebit

    Wuebit Well-Known Member

    James getting a few database errors on 1.0.3

    all-time pass-by-reference has been deprecated

  8. James

    James Well-Known Member

    Will look into this tomorrow. In the meantime, can you remove the ampersand from &$errors in the function parameters and see if that resolves it?
  9. Digital Doctor

    Digital Doctor Well-Known Member

    What happens is someone does change their gender !
    just kidding !​
    EDIT: Ooops ... I see many others have already raised this mirky issue !
  10. fattony69

    fattony69 Well-Known Member

    I think this should be default.
  11. James

    James Well-Known Member

    Are you still getting this error? The add-on still works fine for me.
  12. Wuebit

    Wuebit Well-Known Member

    Opps sorry James missed your other reply.
    I don't have it installed anymore mate after I got that error I got rid.
    James likes this.
  13. Leandros9999

    Leandros9999 New Member

    Dont work for me on 1.0.4
    If I want to edit my profile, I get a white page with "unexpected error occured"
  14. James

    James Well-Known Member

    Does it tell you any errors in the JavaScript console?
  15. iXanon

    iXanon Active Member

    I wonder, is this add-on still required in 1.1?

    I noticed that the Custom User Fields video (02:02) shows an option for "Editable only once", and wondered if this could now be used on the Gender field as stock? I don't have 1.1 so can't look into it myself.. :coffee:
  16. James

    James Well-Known Member

    Gender isn't a custom user field, plus this add-on needs updating and bugfixing which is on my list.
  17. iXanon

    iXanon Active Member

    I was aware of that, but wondered if the functionality had been extended to non-custom fields.

    I'm using 1.0.2, so haven't run in to the reported bugs with the add-on.. :)
  18. iXanon

    iXanon Active Member

    I moved host, and appear to have bumped in to the above mentioned error.
    I don't know if you've now bumped in to it youself and have the full error, but I noticed it wasn't posted here, so...

    In full;
    An exception occurred: Call-time pass-by-reference has been deprecated in /public_html/library/NoGenderChange/ControllerPublic/Account.php on line 16
    XenForo_Application::handlePhpError() in XenForo/Autoloader.php at line 119
    XenForo_Autoloader::autoload() in XenForo/Autoloader.php at line 119
    XenForo_Autoloader->autoload() in XenForo/Application.php at line 852
    XenForo_Application::autoload() in XenForo/Application.php at line 397
    XenForo_Application::resolveDynamicClass() in XenForo/FrontController.php at line 402
    XenForo_FrontController->_getValidatedController() in XenForo/FrontController.php at line 302
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /public_html/index.php at line 13
    I can also confirm that removing the ampersand from two instances of &$errors doesn't work.
  19. James

    James Well-Known Member

    That's strange, it looks like it's an ampersand issue. I'll look into it once I've woken up!

Share This Page