Recent Topics

1 Sep 19, 2007 21:08    

Version 1.10.2

Purpose is to redirect the blogowner to their own blogpage when they login.

Find /inc/_main.inc.php, and add the REDIRECT HACK snippet. This will redirect the user to their own blogspace (www.site.com/joe). This assumes you're using the mod_rewrite function.

		if( ! empty($login_action) )
		{ // We're coming from the Login form and need to redirect to the requested page:
			if( $login_action == 'redirect_to_backoffice' )
			{ // user pressed the "Log into backoffice!" button
				$redirect_to = $admin_url;
			}
			else
			{
				param( 'redirect_to', 'string', $baseurl );
				if( $redirect_to != $baseurl )
				{ // taken from param, decode:
					$redirect_to = str_replace('&', '&', $redirect_to);
				}

				// REDIRECT HACK
				// if user not admin, redirect to users blog
				// ie. www.site.com/loginname
				if($current_User->get('level') != '10'){
					$redirect_to = "/".$current_User->get('login');
				}
			}

			header_redirect( $redirect_to );
			exit();
		}


Form is loading...

Secure CMS – This forum is powered by b2evolution CMS, a complete engine for your website.