I’m using BUM for my user management which works fine. But I’m struggling with the returnUrl.

After a successful login, the user should be redirected to entries/index (the controller entries is not part of BUM but part of the normal webapplication, i.e. protected/Controllers/EntriesController).

How can I achieve this behaviour using BUM as login mechanism?

Thanks and regards,



If I understood correctly you want to redirect the users to entries/index after logIn, right?

In order to obtain this functionality you should:

1 extend UsersController of BUM module and rewrite the actionLogIn action; something like:

class testController extends UsersController



 	* @var string the default layout for the views. Defaults to '//layouts/column2', meaning

 	* using two-column layout. See 'protected/views/layouts/column2.php'.


	public $layout='/layouts/prbtk2';


	public function accessRules()


		return array(

			array('allow',  // 




			array('deny',  // deny all users







 	* Displays the login page


	public function actionLogIn()


		$model = new LoginForm('LoginForm');

		// if it is ajax validation request

		if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')


			echo CActiveForm::validate($model);



		// collect user input data




			// validate user input and redirect to the previous page if valid

			if($model->validate() && $model->login())




		// display the login form




this line is important:


2 create the corresponding logIn view:


Just copy the logIn view form the BUM module (from BUM/views/users/login.php); don’t forget to remove the line where the module is accessed:

remove this lines:

if ($this->module->install) {

    ?><DIV class="message note">Or go to the install page; click <?php echo CHtml::link('here',array('install/index')); ?>.</DIV><?php


because now you are no longer into a module

3 change the logIn URL in your wiews/layouts/main.php to point to the new URL:

array('label'=>'Login', 'url'=>array('/test/login'), 'visible'=>Yii::app()->user->isGuest),

4 in your protected/config/main.php file, under components, change the loginUrl:




			// enable cookie-based authentication



            'class' => 'PRBTKWebUser',

            'loginUrl' => array('//test/login'), // required



now the users should be redirected to entries/index after log in.