My site has user registrations turned off, but signup still shows 'Please login or register to sign up'. The register link takes the user to an access denied page. Here's a simple patch that checks to make sure user registrations are allowed before showing the register link.

Note that there is a string comparison to 0 in the code, which with php can cause some unwanted effects (ie, "" == 0 returns TRUE). However since the variable is using a radio interface with the form API, I don't think its possible for it to have any other values other than 0, 1, or 2.

CommentFileSizeAuthor
signup_modify_login_register_message.patch782 bytesselmanj

Comments

dww’s picture

Status: Needs review » Fixed

Thanks, good catch. I fixed a minor code style problem in the patch (} else { on a single line), and consolidated a little bit, tested, and committed to HEAD and DRUPAL-5.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.