Coder Social home page Coder Social logo

yii-account-module's Introduction

yii-account-module

One simple account module for Yii framework

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

Demo: http://fcofdeznra.me/account-module/

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";
    } ?>

yii-account-module's People

Contributors

pacofdeznra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.