account-module One simple account module

  1. Resources
  2. Changelog
  3. Roadmap
  4. Installation

It allows basic operations on an account, see changelog and roadmap for current and next features.

Resources

Changelog

v0.2 (Jan 29, 2013)
  • Requires mail extension.
  • Register and change email are verified by email.
  • Reset password.
v0.1 (Jan 18, 2013)
  • Register, login, logout, account, change email, change password and desactivate.

Roadmap

  • Keep time and IP of registration and last activity.
  • Account administration.

Installation

  • Unpack account module under your modules directory.

  • Unpack mail extension under your extensions directory and configure it.

  • Execute account/data/schema.mysql.sql script in your database.

  • Enable account module in your configuration:

'modules'=>array(
		...
		'account'=>array(
			'defaultController'=>'account',
		),
	),
  • Change your login URL to /account/account/login:
'user'=>array(
		...
		'loginUrl'=>array('/account/account/login'),
	),
  • Add Register, Login, Account and Logout options to your main menu:
<?php $this->widget('zii.widgets.CMenu',array(
		'items'=>array(
			...
			array('label'=>'Register', 'url'=>array('/account/account/register'), 'visible'=>Yii::app()->user->isGuest),
			array('label'=>'Login', 'url'=>array('/account/account/login'), 'visible'=>Yii::app()->user->isGuest),
			array('label'=>'Account', 'url'=>array('/account/account/account'), 'visible'=>!Yii::app()->user->isGuest),
			array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/account/account/logout'), 'visible'=>!Yii::app()->user->isGuest)
		),
	)); ?>
  • Show user flashes in your main layout:
<?php foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
    } ?>
4 0
13 followers
970 downloads
Yii Version: 1.1
License: LGPL-3.0
Category: Auth
Tags: account, user
Created on: Jan 18, 2013
Last updated: 11 years ago

Downloads

show all

Related Extensions