Recent Topics

1 Jun 19, 2011 11:35    

My b2evolution Version: Not Entered

hi i am new to b2evolution, i have created a skin with custom login form. now i want to redirect users after they login. i also want to display dashboard toolbar at the top of my blog after they login. can some body guide me how i can do this.

here is the link to my blog.

http://localhost/b2evolution/blogs/blog1.php

2 Jun 27, 2011 18:47

Well localhost links don't make much sense ;)

redirect_to param controls where users go after logging in.
This is very easy if you create a plugin. You can also find where these hooks called and edit the core.


	function AfterUserRegistration( & $params )
	{
		global $redirect_to;
		$redirect_to = 'http://some/URL';
	}
	
	
	function ValidateAccountFormSent( & $params )
	{
		return $this->AfterUserRegistration( $params );
	}
	
	
	function AfterLoginRegisteredUser()
	{
		global $login_action, $redirect_to;
		
		if( !empty($login_action) )
		{
			$login_action = 'login';
			$redirect_to = 'http://some/URL';
		}
	}

Users should always see the evobar once they are logged in and granted access to backoffice. Check what you set in Group settings for that particular group.

Also what version of b2evo are you working on? Current development version already has "in skin" login and register pages. So if you don't mind playing using CVS version that may be a better way to go.

Here's a link to the nightly build.
http://doc.b2evolution.net/b2evo_HEAD_snapshot.tgz


Form is loading...