After instalation is complete please set install property to false.

install/PostgreSQL

  1. The sql scripts required for this module must be installed separately!
    Create a database, then run the sql scripts.
    The required sql script can be found in:


    Do not forget to connect the application to the database!
    Example of how to connect to the database:
    • 'db'=>array(
              'tablePrefix'=>'',
              'connectionString' => 'pgsql:host=localhost;port=5432;dbname=myDatabase',
              'username'=>'username',
              'password'=>'password',
              'charset'=>'UTF8',
      ),
      


  2. This module uses the yii-mail module in order to sent confirmation email to the users. So please download and install this module also.


  3. Yii configurations (in config/main.php):

    // autoloading model and component classes
    'import'=>array(
        ...
        'ext.yii-mail.YiiMailMessage', // module yii-mail is required in order to sent confirmation email to the users
    
        'application.modules.bum.models.*',
        'application.modules.bum.components.*',
    ),
    ...
    'modules'=>array(
        ...
        // Basic User Management module;
        'bum' => array(
            // needs yii-mail extension..
    
            'install'=>true, // true just for installation mode, on develop or production mode should be set to false
        ),
        ...
    );
    ...
    // application components
    'components'=>array(
        ...
        'user'=>array(
            ...
            'class' => 'BumWebUser',
            'loginUrl' => array('//bum/users/login'), // required
            ...
        ),
    
        ...
        
        'authManager'=>array(
            'class'=>'CDbAuthManager',
            'connectionID'=>'db',
        ),
        ...
        // required by bum module
        'mail' => array(
            'class' => 'ext.yii-mail.YiiMail', //  module yii-mail is required in order to sent confirmation emails to the users
            'transportType' => 'php',
            'viewPath' => 'bum.views.mail',
            'logging' => false,
            'dryRun' => false,
        ),
        ...
    ),
    


  4. After completed the above steps, please set the corresponding roles as follow:

    • SuperAdmin role
      • manageUsers task
        • users_admin operation
        • users_create operation
        • users_delete operation
        • users_all_view operation
        • users_profile_update operation Update other users profile...
        • users_all_privateProfile_view operation View other users private profile...
        • password_change operation With this right user can change the password without knowing the old password.
      • emails_manage task
        • emails_create operation
        • emails_delete operation
        • emails_all_view operation
        • emails_verificationLink_resend operation
      • settings_manage task
        • settings_emails_customization operation
    Click here to automatically create/update role/tasks/operations!


  5. Also tow default users can be created once that module is installed:

    • admin
    • demo
    Click here to automatically create default users!


  6. If you want to delete users that are not active, please add action actionDeleteUnactivateUsers from CronController to your cron. (/cron/deleteUnactivateUsers)

    If you want to delete unconfirmed emails, please add action actionDeleteUnverifiedEmails from CronController to your cron.(/cron/deleteUnverifiedEmails)



  • This module uses the default authorizing manager (CDbAuthManager).


  • Here is an example of how to include BUM module into your main menu (protected/views/layouts/main.php):

    <?php $this->widget('zii.widgets.CMenu',array(
        'items'=>array(
            ...
            array('label'=>'Install', 'url'=>array('/bum/install'), 'visible'=>Yii::app()->getModule('bum')->install),
            array('label'=>'My Profile', 'url'=>array('/bum/users/viewProfile', 'id'=>Yii::app()->user->id), 'visible'=>!Yii::app()->user->isGuest),
            ...
            array('label'=>'Login', 'url'=>array('/bum/users/login'), 'visible'=>Yii::app()->user->isGuest),
            array('label'=>'SingUp', 'url'=>array('/bum/users/signUp'), 'visible'=>Yii::app()->user->isGuest),
            array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
        ),
    )); ?>
    


  • If you want to use RBAM module with this module then RBAM module needs the following setups:

    'modules'=>array(
        'rbam'=>array(
            // RBAM Configuration
            'userClass'=>'Users', // BUM user class
            'userNameAttribute'=>'user_name', // BUM default user name attribute
        ),
    ),
    
    OBSERVATIONS: In order to make module RBAM to work with PostgreSQL the following table names should be changed:
    • AuthAssignment to auth_assignment
    • AuthItemChild to auth_item_child
    • AuthItem to auth_item
    and authManager array should be initialized like:
    'authManager'=>array(
        'class'=>'CDbAuthManager',
        'connectionID'=>'db',
        'itemTable'=>'auth_item',
        'itemChildTable'=>'auth_item_child',
        'assignmentTable'=>'auth_item_child',
    ),