User Register Redirect

Component ID

236798

Component name

User Register Redirect

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

1173

Component created

Component changed

Component body

Redirect to a specified page after an administrator creates a user, based on the newly-created-user's roles.

This module depends on a new additional hook_user $op, after_insert, which must be manually added to Drupal core. Apply the following patch:

Modified: modules/user/user.module
===================================================================
--- modules/user/user.module	2008-03-19 16:10:56 UTC (rev 3362)
+++ modules/user/user.module	2008-03-19 20:50:14 UTC (rev 3363)
@@ -226,6 +226,7 @@
 
     // Build the finished user object.
     $user = user_load(array('uid' => $array['uid']));
+    user_module_invoke('after_insert', $array, $user, $category);
   }
 
   // Save distributed authentication mappings

Hopefully this can become a standard part of core someday.

I wrote this module as part of a Kosada Inc development project --- we use this in conjunction with Node Profile to save administrators a few clicks. Depending on the roles the administrator gives the user, the next screen shown after submitting the user is the appropriate Node Profile to be completed for that user.