Support » Plugins » Theme My Login: redirect edit

  • Resolved Doodlebee


    I just had a question. I know Theme My Login is set up to allow filters for certain things (I’ve already used such filters like tml_title_filters with great success), but I need to sort one out for a custom redirect.

    I, of course, have the redirects set up on the site, no problem. I want to redirect the end user – once they log in – to their profile. However, I’m trying to keep them out of the back end, and I have a custom function written so when the end user clicks the “View Profile” link I have set up, it takes them to a profile front-end Page. The profile they see is edited by adding in “?username” at the end of the URL.

    I can’t really do this type of redirect with the plugin, so I was hoping to use a filter that would allow me to redirect the end user to this page: So far, all I can do is redirect them to – which doesn’t retrieve the proper information.

    Can you help me sort out what filter call I need to make? I was thinking it was tml_request(), but that’s apparently for actions. I can’t seem to find the filter I need to pull this off.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Doodlebee


    forgot to link to the plugin in question:



    Okay, I got it sorted. I just removed the redirection module from the plugin and used a WordPress function:

    function redirect_to_profile() {
    	$who = strtolower(sanitize_user($_POST['log']));
    	$redirect_to = get_option('home') . '/profile?' . $who;
    	return $redirect_to;
    add_filter('login_redirect', 'redirect_to_profile', 10, 2);

    Hope that helps someone else!

    Jeff Farthing


    That works – but as of TML 6.2, you can use the variable %username% within the Custom Redirection module URL fields.



    Well, that’s even better! Awesome! Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Theme My Login: redirect edit’ is closed to new replies.