Extension:RedirectOnLogin

This little extension allow you, when an user login successfully, to redirect him directly to a page of your choice instead of the usual "you are now logged in" page.

Compatibility
This was created for MW 1.12.0 and is currently untested on others (please update this page when you try it on other versions), but it should work fine as long as the 'UserLoginComplete' hook (1.4+) and $wgOut->redirect exists.

From MW 1.13, 'UserLoginComplete' hook functions need a 2nd parameter. Modified code is provided below.

Extension code for 1.12-
Create a page at "extensions/redirectOnLogin.php" with the following content

Extension code for 1.13+
The only difference is a second (not used) argument on the redirectOnLogin function, (added on 1.13)

Take the code above, but replace the redirectOnLogin function with the following one :