Postponed (maintainer needs more info)
Project:
Invite
Version:
6.x-2.0-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2007 at 22:09 UTC
Updated:
12 Aug 2010 at 23:58 UTC
When the site is set to allow new accounts by invitation only, the Create new account tab shows up if a user clicks on the Request a New Password link.
It would be nice to remove the Create a new account tab unless they hit the page directly. It's kind of confusing to some folks and I'd rather not waste my time on this kind of support. ;)
I don't know how possible this actually is (I'll look into it and submit a patch if I can), but we may be resorting to just using CSS to hide it that way if nothing else.
Comments
Comment #1
knseibert commentedHi Andrew,
the problem is that the menu entry is generated in the user.module whenever variable_get('user_register') returns not 0 (aka whenever User settings->Public registrations is not set to "Only site administrators..."). There is no way around that without patching the user.module. So i guess the invite.module cannot solve your issue.
However you could add the following lines to your template.php file(s):
This prevents the "Create new account" menu item from being rendered.
Comment #2
zostay commentedThanks!
I'll try the work-around.
Comment #3
patchak commentedThis workaround worked, thanks a lot!
Comment #4
smk-ka commentedAdded knseibert's snippet to the (slightly outdated *ahem*) README.txt.
--
Stefan Kudwien
unleashed mind
Comment #5
(not verified) commentedComment #6
jechilt commentedI need this to work in version 6.x
can someone help me?
Comment #7
studiopow commentedHi, I tried the code snippet found here to remove the rendering of the "Create new account" tab as described above but I get the following message: warning: Missing argument 2 for phptemplate_menu_item_link() in (...)template.php on line 209. How could that be fixed or did I miss something essential?
Comment #8
synesthete commentedThe snippet from knseibert is written for the 5 version of theme_menu_item_link. The 6 version has only $link as an argument.
The README.txt should also be updated to reflect this.
Comment #9
smk-ka commentedWow, I must say I didn't scroll down in the README for a long time. This is seriously outdated stuff...
For D6 this code snippet actually isn't required anymore. If the Create new account tab appears nonetheless for you, there must be some other module overriding invite.module's access handler. Otherwise it should alreadybe hidden, if the site accepts new user registration 'by invitation only'. Is that the case for you?
Comment #10
synesthete commentedI honestly haven't used the Invite module in this way. Had come across this thread while searching for a method to hide the "Create new account" tab in D6. Got it sorted out and thought to post the info here where someone else might find it and put it to use.