I want to hide the "create new account" link, also with the possibility from the users to register active, because I want to send the url of the registration page only to a list of email addresses that I have.
I have to modify something in the user.module, on in the css?
Thank you.

Comments

chcgeek’s picture

Do you have your user settings set to "Only site administrators can create new user accounts." ?

Barbara
aka "Chaplain Geek"

charly’s picture

you can admin menus and disable the register item (?q=admin/menu)

enxox’s picture

I want that user can create their own account, but I don't want the link to register page shown in the login block!!!!

chcgeek’s picture

You could make an account with their email as their user name as drupal will let users change their user name after they log in. This new patch http://drupal.org/node/42119 would automatically create the email to go out. This might be easier than trying to do it with styles and themes.

Just a thought.

Barbara
aka"Chaplain Geek"

enxox’s picture

I don't want to add by myself over 1.000 users, I want to send only an email with the address of the page where they can register.
But I want that only those users knows this page...an anonymous user won' t have the possibility to register

heine’s picture

Users can still register when you hide or disable the link on user/register. Simply hiding the link (deleting from user.module or disabling the user block) won't prevent the page from being indexed by search engines, so you'll have to block the page in robots.txt

If you already have their email addres why not programmatically create drupal accounts and mail the details out?

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

enxox’s picture

but this is what the site's owner wants.... ;-)

I'm hiding the links by css.
Thank you again.

heine’s picture

but this is what the site's owner wants.... ;-)

Now I get it :-)
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

enxox’s picture

Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

I didn't really solve my problem.
How can I remove that link from user.module, for example?

heine’s picture

You wrote you were going to hide the link with CSS.

Anyway go to user.module, function user_block and remove or comment (//):

if (variable_get('user_register', 1)) {
  $items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
}

(note php tags are for decoration)

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

enxox’s picture

Thank you!!! Another way to solve my problem!

cake’s picture

If you hide the link using CSS, you can add some thing like this

function {yourcustommodule}_menu($may_cache) {

		$items[] = array(
			'path' => 'user/register',
			'title' => t('This should not show up'),
			'callback' => 'drupal_not_found',
			'type' => MENU_CALLBACK
		);
}

So if some one find the url, the result will allways be a page not found

hope it help (-:

abaddon’s picture

this would also disable registrations which he doesnt want, and you can actually do it via the admin config (disable them i mean)
you can use CSS or a custom module with a hook_form_alter for the login form that displays that registration link

switch13’s picture

from the admin screens for D7

?q=admin/config/people/accounts