bogsey/yiiquickswap

A Yii module allowing the logged in user to be quickly changed to speed up application deveoplement

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 1

Type:yii-extension

dev-master 2013-03-03 20:54 UTC

This package is not auto-updated.

Last update: 2024-11-09 14:45:16 UTC


README

A Yii module allowing the logged in user to be quickly changed to speed up application deveoplement

Usage

Setup

Unzip the module under protected/modules/yiiQuickSwap and add the following to your main config

return array(
  'modules' => array(
    'yiiQuickSwap',
  ),
  'components' => array(
    'yiiQuickSwap' => array(
      'class' => 'yiiQuickSwap.components.yiiQuickSwap',
      'users' => array('user1', 'user2'), // a list of users that you want to swap between
      'redirect' => 'application.views.site.index', // where to redirect to after the swap
    ),
  ),
)

Use only on developement builds as this module allows anyone to log in as the users specified in the config file without the need for a password.

Using the module

Simply include the following code in the view file where ever you would like the menu to appear.

<?php echo $this->renderPartial('yiiQuickSwap.views.menu'); ?>

or you can point your browser to http://your.site.address/index.php?r=yiiQuickSwap