Yii 1.1: login

a login portlet that can be placed on the side bar of pages

This extension provides a login portlet named XLoginPortlet that provides user login functionality.

XLoginPortlet extends from XPortlet. It provides a login form that requires users to enter username and password. It then uses UserIdentity (can be customized) to perform the actual authentication. If successful, it will login the user and reload the current page.





  • Extract the release file under protected/extensions. Make sure a login sub-directory is generated.

Using XLoginPortlet

XLoginPortlet is a widget that can be placed in a controller view or layout view as follows:

<?php $this->widget('application.extensions.login.XLoginPortlet',array(
)); ?>

By default, it assumes a user identity class UserIdentity can be found at application.components.UserIdentity. If your application is using a different user identity class, you will need to configure the identityClass property of XLoginPortlet in the above.

In the above, we set the visible property to be true only when the user is not logged in. As a result, if the user has successfully logged in, the login portlet will disappear.

Change Log

Nov. 25, 2008

  • removed XPortlet from the extension

Total 1 comment

#8441 report it
maxxdev at 2012/06/04 04:24am
ajax validation

Please add an example of using Ajax validation without reload current page

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: qiang
  • Category: Auth
  • Votes: +7
  • Downloaded: 3,280 times
  • Created on: Nov 18, 2008
  • Last updated: Dec 16, 2008