Hi All,
I was wondering how I would remove the "Create new account" and potentially also the "Request new password" links from the main members area login page when a user is not logged in...
http://www.wormfarmingsecrets.com/members/
Basically I am setting up a paid membership site, using Drupal as the CMS and another application to manage payment and subscriptions etc. These are sucessfully talking to each other at the moment. However there is a conflict that does not allow me to protect this location (via the sub management script) http://www.wormfarmingsecrets.com/members/ due to rewrite rules. This is fine with me, if I can remove the above two links somehow. That way if anyone actually arrives at this page (bypassing sub management), they will not be able to create an account anyway.
Further, I would like to change the error message from...
"Access denied
You are not authorized to access this page."
...to something more pleasent such as...
"Private Members Only Area
This area is for members only. Existing members please login using the form or if you would like to become a member click here."
Thanks in advance to anyone who can help.
Best...
Duncan
Comments
To disable "Create new
To disable "Create new account" link go to Administer -> User management -> User settings and make public registration as "Only site administrators can create new user accounts."
--
Cheers,
Sivanandhan, P. (a.k.a. apsivam)
www.apsivam.in
change message access denied
The other comment on removing "Create new account" is correct. That is the best solution.
To change the "Access denied" message into something else is a bit harder. I did a quick-and-dirty hack in the drupal core file "common.inc". Search on "Access denied" and just change the text in these funtion calls:
drupal_set_title(t('Access denied'));
$return = t('You are not authorized to access this page.');
and you're set. FYI: This is NOT a recommended way to change things in Drupal as you are changing stuff in the core files. When you upgrade OR security patch your Drupal installation you may at best loose such changes (or maybe get strange behavior).
If anyone knows a better way, please let us know. This should probably be done using a module, I couldn´t find any readymade so I guess it's time to start getting into drupal developing ..?!
Thanks to you both. I did
Thanks to you both. I did change the admin only can create account and that worked fine.
As for the other, I know that's not the best idea, but will give it a shot and see what happens. I spent hours looking for that code not having a clue what file it would be in.
Thanks again.
Duncan
I think this module is what
I think this module is what you're looking for
http://drupal.org/project/customerror
Regards
Chisel
Hi Duncan Just to let you
Hi Duncan
Just to let you know that the "click here" link doesn't appear to be active
Lynne
http://www.homeworkinguk.com