I assume this is not desirable behavior. If a site is set to invite-only registration, a "register to post comments" link should not display (it just leads to an Access Denied page).

Here's a patch for the D6 2.x branch.

Comments

goron’s picture

Status: Active » Needs review
glekli’s picture

Status: Needs review » Needs work

Good catch, thanks.
If I may make an observation, invite_comment_post_forbidden() in the patch is an almost exact copy from comment module. It would be redundant to have the same thing in two places, and, furthermore, if the theme function in comment module gets an update, this module would make that ineffective. Do you think hook_link_alter can be used instead to hide the register link?

goron’s picture

StatusFileSize
new1.19 KB

Good idea. I didn't realize actually that this was being outputted in the $links.

While it will mean a bit of extra work (in terms of performance), and a good bit of the code does actually need to be there, I still agree it's cleaner and more maintainable. Also, it leaves it possible for other modules/themes to override that theme function without messing with Invite.

Here's an updated patch. Let me know if this method looks better.

goron’s picture

Status: Needs work » Needs review

oops

glekli’s picture

Status: Needs review » Fixed

Looks good, thank you. Committed.

Status: Fixed » Closed (fixed)

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