Yii 1.1: account-module

One simple account module

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



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.


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


  • 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:

  • Change your login URL to /account/account/login:
  • Add Register, Login, Account and Logout options to your main menu:
<?php $this->widget('zii.widgets.CMenu',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";
    } ?>

Total 10 comments

#17559 report it
heal at 2014/07/02 08:43am

I need exactly this extension. Account handling, without the profile and other things.

#14789 report it
Paco Fernández-Nogueira at 2013/09/10 02:33am

@leo4all Sorry, my hosting is over and I can not afford to renew it. Know any free?

#14787 report it
leo4all at 2013/09/09 06:04pm

demo version not working.

#13336 report it
Paco Fernández-Nogueira at 2013/05/22 02:17pm
RE: Login before validating account?

Yes,I did. This is the expected behavior.

It isn't difficult to configure the module to disallow it.

#13318 report it
cadju at 2013/05/22 09:03am
Login before validating account?

I've been studying the code of this module and it seems that it allows a user to login before validating his account. Did you test this?

#12380 report it
Nur Rochim at 2013/03/17 11:31am

i like this Thanks...

#11564 report it
Paco Fernández-Nogueira at 2013/01/21 02:54am
Not an all-in-one

ApXaHgheJI, there is no account administration, yet. I know about yii-user and yii-user-management modules, they are complete solutions but I don't need all their features.

Yes, this module is intentionally very simple. I hope to build several concise modules to increase their reusability :)

#11560 report it
ApXaHgheJI at 2013/01/20 05:12pm

Dude , demo user for administrator ? - I know a module, there you can make some relation between profile fields and other tables, generate N field from Admin-Area, manage users, block , unblock, update, add, delete...

Sorry your module its.... weak for the moment ! But nice try, maybe in the future ... !!!

#11554 report it
Paco Fernández-Nogueira at 2013/01/20 11:19am

is now available :)

#11542 report it
ApXaHgheJI at 2013/01/19 08:39am


Leave a comment

Please to leave your comment.

Create extension