yii-quick-swap A module that quickly swaps between registered users to speed up developement

yiiQuickSwap

  1. Requirements
  2. Setup
  3. Resources

This module will place a menu anywhere in the application that will quickly swap which user is logged in to see how different users see the site.

Requirements

Yii 1.1 or above

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

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

Resources

3 0
9 followers
271 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Auth
Tags: login, logout, user
Developed by: Bogsey
Created on: Jan 29, 2013
Last updated: 5 years ago

Downloads

show all

Related Extensions