Can anyone please help and advice how to install yii user management module into yii boilerplate?
I try download yum and place in common/modules folder, and edit backend/config/main.php as below:
return CMap::mergeArray(
array(
'name' => 'Clevertech Backend Boilerplate',
// @see http://www.yiiframework.com/doc/api/1.1/CApplication#basePath-detail
'basePath' => 'backend',
// set parameters
'params' => $params,
// preload components required before running applications
// @see http://www.yiiframework.com/doc/api/1.1/CModule#preload-detail
'preload' => array('bootstrap', 'log'),
// @see http://www.yiiframework.com/doc/api/1.1/CApplication#language-detail
'language' => 'en',
// using bootstrap theme ? not needed with extension
// 'theme' => 'bootstrap',
// setup import paths aliases
// @see http://www.yiiframework.com/doc/api/1.1/YiiBase#import-detail
'import' => array(
'common.components.*',
'common.extensions.*',
/* uncomment if required */
/* 'common.extensions.behaviors.*', */
/* 'common.extensions.validators.*', */
'common.models.*',
'common.modules.*',
// uncomment if behaviors are required
// you can also import a specific one
/* 'common.extensions.behaviors.*', */
// uncomment if validators on common folder are required
/* 'common.extensions.validators.*', */
'application.components.*',
'application.controllers.*',
'application.models.*',
'application.modules.user.models.*'
),
/* uncomment and set if required */
// @see http://www.yiiframework.com/doc/api/1.1/CModule#setModules-detail
'modules' => array(
'user'=>array(
'debug'=>true,
)
/*'gii' => array(
'class' => 'system.gii.GiiModule',
'password' => 'clevertech',
'generatorPaths' => array(
'bootstrap.gii'
)
)*/
),
'components' => array(
'user' => array(
'class' => 'application.modules.user.components.YumWebUser',
'allowAutoLogin'=>true,
'loginUrl'=> array('//user/user/login')
),
/* load bootstrap components */
'bootstrap' => array(
'class' => 'common.extensions.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
'errorHandler' => array(
// @see http://www.yiiframework.com/doc/api/1.1/CErrorHandler#errorAction-detail
'errorAction'=>'site/error'
),
// 'db'=> array(
// 'connectionString' => $params['db.connectionString'],
// 'username' => $params['db.username'],
// 'password' => $params['db.password'],
// 'schemaCachingDuration' => YII_DEBUG ? 0 : 86400000, // 1000 days
// 'enableParamLogging' => YII_DEBUG,
// 'charset' => 'utf8'
// ),
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'urlSuffix' => '/',
'rules' => $params['url.rules']
),
/* make sure you have your cache set correctly before uncommenting */
/* 'cache' => $params['cache.core'], */
/* 'contentCache' => $params['cache.content'] */
),
),
CMap::mergeArray($mainEnvConfiguration, $mainLocalConfiguration)
);
I got below error
Alias "application.modules.user.components.YumWebUser" is invalid. Make sure it points to an existing PHP file and the file is readable.
I try download yum and place in common/modules folder, and edit backend/config/main.php as below:
return CMap::mergeArray(
array(
'name' => 'Clevertech Backend Boilerplate',
// @see http://www.yiiframework.com/doc/api/1.1/CApplication#basePath-detail
'basePath' => 'backend',
// set parameters
'params' => $params,
// preload components required before running applications
// @see http://www.yiiframework.com/doc/api/1.1/CModule#preload-detail
'preload' => array('bootstrap', 'log'),
// @see http://www.yiiframework.com/doc/api/1.1/CApplication#language-detail
'language' => 'en',
// using bootstrap theme ? not needed with extension
// 'theme' => 'bootstrap',
// setup import paths aliases
// @see http://www.yiiframework.com/doc/api/1.1/YiiBase#import-detail
'import' => array(
'common.components.*',
'common.extensions.*',
/* uncomment if required */
/* 'common.extensions.behaviors.*', */
/* 'common.extensions.validators.*', */
'common.models.*',
'common.modules.*',
// uncomment if behaviors are required
// you can also import a specific one
/* 'common.extensions.behaviors.*', */
// uncomment if validators on common folder are required
/* 'common.extensions.validators.*', */
'application.components.*',
'application.controllers.*',
'application.models.*',
'application.modules.user.models.*'
),
/* uncomment and set if required */
// @see http://www.yiiframework.com/doc/api/1.1/CModule#setModules-detail
'modules' => array(
'user'=>array(
'debug'=>true,
)
/*'gii' => array(
'class' => 'system.gii.GiiModule',
'password' => 'clevertech',
'generatorPaths' => array(
'bootstrap.gii'
)
)*/
),
'components' => array(
'user' => array(
'class' => 'application.modules.user.components.YumWebUser',
'allowAutoLogin'=>true,
'loginUrl'=> array('//user/user/login')
),
/* load bootstrap components */
'bootstrap' => array(
'class' => 'common.extensions.bootstrap.components.Bootstrap',
'responsiveCss' => true,
),
'errorHandler' => array(
// @see http://www.yiiframework.com/doc/api/1.1/CErrorHandler#errorAction-detail
'errorAction'=>'site/error'
),
// 'db'=> array(
// 'connectionString' => $params['db.connectionString'],
// 'username' => $params['db.username'],
// 'password' => $params['db.password'],
// 'schemaCachingDuration' => YII_DEBUG ? 0 : 86400000, // 1000 days
// 'enableParamLogging' => YII_DEBUG,
// 'charset' => 'utf8'
// ),
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'urlSuffix' => '/',
'rules' => $params['url.rules']
),
/* make sure you have your cache set correctly before uncommenting */
/* 'cache' => $params['cache.core'], */
/* 'contentCache' => $params['cache.content'] */
),
),
CMap::mergeArray($mainEnvConfiguration, $mainLocalConfiguration)
);
I got below error
Alias "application.modules.user.components.YumWebUser" is invalid. Make sure it points to an existing PHP file and the file is readable.