Usually when forms are submitted users stay at the same page or some meaningful result page. For some reason, lot's of invite forms and cancel links on those forms redirect to front page, which is really not comfortable. For example, guess a user is working with his invites - inviting new users, cleaning up his/her old invitations - and every time s/he submits a form or clicks on a cancel button s/he is forced to front page and needs to get to invite pages clicking links over and over again.

This was a huge problem for our project as well as for many others - you can see in threads like, for example, #2227995: Avoid drupal_goto() within invite_withdraw_form_submit() people had problems with hard-coded redirections to front page before and after it become possible to alter this behavior they started to override it in custom modules. So to save Invite module's users from this kind of troubles I am going to submit a patch in a minute - I just needed nid of the issue to properly name the patch.

There is a new setting in the modules admin pages as shown in the screenshot that allows to preserve the old behavior. In fact, users now can set whatever destinations using tokens, but most useful destination for such redirects would be user/[invite:inviter:uid]/invites or user/[invite:inviter:uid]/invites/pending.

sd

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nickonom created an issue. See original summary.

nickonom’s picture

Status: Active » Needs review
FileSize
3.94 KB

So here is the patch. Hopefully this will get into the module as it will really ease lives of many Invite module users.