Yii 1.1: cruge

user management module for controlling visual rbac, email based on views, yii authentication, and a ready for use UI.


Cruge Login Example Using CrugeConnector Plugin

Cruge is a module providing an extension to the standard Yii Auth mechanism. Using Cruge, you can focus in your application needs, leaving to Cruge the common tasks: registration, password recovery, profile editor, rbac online editor and so on.

It extends the standard Yii Auth API providing more features and providing screens (UI) to help you in get focused in your application needs.

Many people are using Cruge today, it is a well-organized in Code and Architecture, no spaghetti-dependencies, instead a well formed Factory architecture based on components and no-interdependencies.

Cruge was originally designed for those spanish speakers, due to the community is very big and requires a tool that do this work in its native language.

The primary Cruge Features you will are:

  • Visual RBAC editor and Access Control.
  • Registration, Password Recovery, Profile (and its Customizable Fields)
  • User Management Screens.
  • Customizable Profile Fields.
  • Mailer based on views.
  • Support for Remote Authentication. Inclusive Facebook and Google.
  • Session Management. Using Filters based on abstract classes.
  • Menu Creator, based on Rbac Rules.
  • API for manage users, rbac, and session control.
  • It Supports jQueryUI, Bootstrap. Fancybox, etc, Customizable Views.

Cruge Tutorials & Doc (Wiki, Spanish Only)

Cruge Repository (Bitbucket)

my blog


  • PHP Version 5.2.6, 5.4.4, 5.4.5

  • Yii Framework 1.12, 1.13


  • User Registration Screen. All fields provided in this view are automatically rendered by Cruge, providing Customizable Profile Field, inclusive regexp validated, and more. Cruge Registration Screenshot

  • User Management Screen. User Management Screenshot

  • Customizable Fields Editor Customizable Fields Editor Screenshot

  • Visual Role Assignation Visual Role Assignation Screenshot

  • Visual Role Editor (due the new transation, the labels can be in english too, thanks to Ricardo Obregon) Visual Role Assignation Screenshot

Total 17 comments

#17179 report it
Biktor at 2014/05/09 07:34pm
¿Cómo obtengo en Cruge las operaciones de un controlador en un subdirectorio dentro de Controllers?

Hola, resulta que los controladores de la aplicación a la que debo aplicar el control de acceso están dentro de un subdirectorio de la carpeta controllers, por lo tanto Cruge no los toma automáticamente. ¿Cómo puedo hacer que los tome?

#17178 report it
Biktor at 2014/05/09 07:25pm
En mi proyecto uso Bootstrap 3, ¿cómo lo implemento en las vistas del módulo?

Hola, ¿cómo puedo extender las vistas del módulo para usar bootstrap 3?

#14953 report it
NetDaddi at 2013/09/24 04:35am

This was just a Newbie mistake. I added the extension to models and not modules.

#14936 report it
YavorKirov at 2013/09/23 07:56am

@NetDaddi (Michael) I am afraid I never encountered that very same error. Only possibility I can think, besides being a typo, which it is obviously not, is that you missed to add the lines into config/main.php


I hope you did that, but just in case.

...Anyway please if you find out what was wrong with it, even if "something simple" share with the rest of us ;)

P.S there is also a little chance a file got corrupted or something. try to download again maybe.

PPS http://s18.postimg.org/40bpexrrt/screenshot_50.png here is my directory structure in case your is different.

#14929 report it
NetDaddi at 2013/09/23 12:29am
Alias "application.modules.cruge.components.CrugeWebUser" is invalid


I just installed the english version yesterday and I am now receiving this error when I am calling the layouts/main.php on this line.

array('label'=>'Login', 'url'=>Yii::app()->user->ui->loginUrl, 'visible'=>Yii::app()->user->isGuest),

I triple checked the setup and everything looks good. I am not sure where to go from here. The directories are in lower case and flagged as read/write as well. The file is in the correct location.

i am not sure if this would have anything to do with it, but I am running it locally on a Mac Mountain Loin OS.

Any insight you can give to resolve this issue would be great. Thank you in advance for your time.


#14678 report it
YavorKirov at 2013/09/03 03:46am
English version...

Hey guys I wanted to say "thank you" for the great extension so I translated it (finished the translation) in English.

here is a link to the Cruge-english bitbucket repo

I have also made an effort to translate the readme and the install instructions into English ( you can see these on the page on bitbucket)

P.S. I used some already partially translated version of the extension so it might not be the latest and greatest Spanish version as here. I read the author is planning a new version I'd be happy to help translating the stuff for it into English. Though I do not speak/know Spanish it tends to be doable.

#13578 report it
alfredo_90 at 2013/06/07 11:36am
hola esta muy interesante y me gusto mucho

pero me pueden ayudar a la hora de poner roles tareas y operaciones me sale un error y es el siguiente:

include(SBaseController.php): failed to open stream: No such file or directory

que puedo hacer, soy principiante en esto, y ya lei el manual varias veces pero no funciona espero k me ayuden

#13343 report it
jneto at 2013/05/23 09:16am
tutorials & Docs & Wiki to English ?

Can someone translate the Cruge tutorials & Docs & Wiki to English ?

#12563 report it
bluyell at 2013/03/29 12:06am
message & transation

recently (due to non-spanish speakers demand) Cruge has incorporated a standard yii translations message table, thanks to Ricardo Obregon. You can observe the commit in respet to this issue:


#12009 report it
Pasta at 2013/02/20 07:03am
Thank you

It's great extension!
But one question.
I couldn't find method for change language, but i found "messages" dir.
How i may do it?

#11272 report it
JerryCode at 2013/01/02 04:17pm
Sobre el idioma

Y que pasa que está en español, YII Framework está en inglés y no sé nada sobre ese idioma, aun así trato de aprender como pueda.

Gracias por la extensión me la recomendaron.

#10330 report it
bluyell at 2012/10/19 07:31pm
not in enligsh...yet, but comming soon.

Helo, we are encourage to translate the README and SOURCE COMMENTS to standard englih in short time, is a large work because details. coming soon.

#10163 report it
ApXaHgheJI at 2012/10/08 08:53am

Very bad that the language FAQ is not English, and the vars in SC is elso not in English.

+1 bennouna !

#9964 report it
blammo at 2012/09/25 10:45am
Como manejar los items de menu en el main layout?

hola, estoy intentando filtrar que opciones se muestran el menu Prueba 1) Intente crear varios menus segun el rol..y no funciono...

if(Yii::app()->user->checkAccess('student')){ $this->widget('zii.widgets.CMenu',array( 'items'=>array( //inicio

array('label'=>'Home', 'url'=>array('/site/index')),

De esta manera No reconoce el role.

Prueba 2) Intente usar la opcion "visible" por rol ..

array('label'=>'Testimonials', 'url'=>array('/testimonials/create/','view'=>'testimonials', 'visible'=>Yii::app()->user->checkAccess('student', $params))),

Muestra a todos los usuarios sin importar el rol el item del menu

hay alguna forma de lograr segun el rol que muestre un item Determinado, probe de estas formas y nada...

Esta buenisimo pero estoy renegando con este tema. Si me das una mano :-) Mil gracias de ante mano

#9472 report it
bluyell at 2012/08/14 10:09am
@abennouna, yes mainly in spanish, but comming soon in english

hello @abennouna, yes you are in right, because im spanish speaker the obvious way (i think) to document this extension is in spanish at first place, next (comming soon) in english. source code is totally written in english, not well formatted yet.

#9450 report it
bennouna at 2012/08/12 01:06pm
Why in Spanish?

Sorry to say it like this, there's no other way: I thought the mainstream / official language on the forum is English. While I'm sure this extension is great, the fact this page is in Spanish makes it belong to some blog, not here.

My 2 pesos :)

#9413 report it
xNicox at 2012/08/09 08:13am
Parece muy interesante !!

Hola, parece muy interesante, lastima que mi desarrollo esta en produccion ! Pero para el proximo lo pruebo ? Siempre quise algo que: 1) solo modifique el accessRule del controller y sepa que controlador, accion, usuario esta accediendo ! 2) en desarrollo vaya creando las entradas de RBAC solo !!


Leave a comment

Please to leave your comment.

Create extension