Comments (14)
Hi, first you should remove 'identityClass' => 'app\models\User', from 'user' component
Second, show me your error page please
from user-management.
identityClass deleted;
git diff after whole process ;)
diff --git a/composer.json b/composer.json
index 99161eb..e06e523 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,7 @@
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
+ "prefer-stable": true,
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
diff --git a/config/console.php b/config/console.php
index 31ed9c7..dd1bae1 100644
--- a/config/console.php
+++ b/config/console.php
@@ -12,6 +12,9 @@ return [
'controllerNamespace' => 'app\commands',
'modules' => [
'gii' => 'yii\gii\Module',
+ 'user-management' => [
+ 'class' => 'webvimark\modules\UserManagement\UserManagementModule',
+ ],
],
'components' => [
'cache' => [
diff --git a/config/web.php b/config/web.php
index 48f76f2..2df2884 100644
--- a/config/web.php
+++ b/config/web.php
@@ -17,8 +17,7 @@ $config = [
'class' => 'yii\caching\FileCache',
],
'user' => [
- 'identityClass' => 'app\models\User',
- 'enableAutoLogin' => true,
+ 'class' => 'webvimark\modules\UserManagement\components\UserConfig',
],
'errorHandler' => [
'errorAction' => 'site/error',
@@ -46,6 +45,11 @@ $config = [
'db' => require(__DIR__ . '/db.php'),
],
'params' => $params,
+ 'modules'=> [
+ 'user-management' => [
+ 'class' => 'webvimark\modules\UserManagement\UserManagementModule',
+ ],
+ ],
];
if (YII_ENV_DEV) {
diff --git a/controllers/SiteController.php b/controllers/SiteController.php
index f959941..0aea4e2 100644
--- a/controllers/SiteController.php
+++ b/controllers/SiteController.php
@@ -14,16 +14,8 @@ class SiteController extends Controller
public function behaviors()
{
return [
- 'access' => [
- 'class' => AccessControl::className(),
- 'only' => ['logout'],
- 'rules' => [
- [
- 'actions' => ['logout'],
- 'allow' => true,
- 'roles' => ['@'],
- ],
- ],
+ 'ghost-access'=> [
+ 'class' => 'webvimark\modules\UserManagement\components\GhostAccessControl',
],
'verbs' => [
'class' => VerbFilter::className(),
from user-management.
Hmmm, check please vendor\webvimark\module-user-management\components folder and make sure that file GhostAccessControl.php is there =)
My only guess so far that module wasn't really installed.
Btw, does migrations worked fine ?
from user-management.
files are in filesystem ;)
c:\htdocs\base\vendor>dir webvimark\module-user-management\components
Katalog: c:\htdocs\base\vendor\webvimark\module-user-management\components
2015-04-13 09:14 <DIR> .
2015-04-13 09:14 <DIR> ..
2015-04-13 09:14 8 970 AuthHelper.php
2015-04-13 09:14 2 627 GhostAccessControl.php
2015-04-13 09:14 684 GhostHtml.php
2015-04-13 09:14 1 279 GhostMenu.php
2015-04-13 09:14 1 279 GhostNav.php
2015-04-13 09:14 1 381 UserAuthEvent.php
2015-04-13 09:14 997 UserConfig.php
2015-04-13 09:14 4 040 UserIdentity.php
8 plik(ów) 21 257 bajtów
and migrations doesn't work as well:
c:\htdocs\base>yii migrate --migrationPath=vendor/webvimark/module-user-management/migrations/
[13.04.2015 10:33:07 p284/t6976 NOTICE] Successfully established connection to the database
Yii Migration Tool (based on Yii v2.0.3)
Total 10 new migrations to be applied:
m140608_173539_create_user_table
m140611_133903_init_rbac
m140808_073114_create_auth_item_group_table
m140809_072112_insert_superadmin_to_user
m140809_073114_insert_common_permisison_to_auth_item
m141023_141535_create_user_visit_log
m141116_115804_add_bind_to_ip_and_registration_ip_to_user
m141121_194858_split_browser_and_os_column
m141201_220516_add_email_and_email_confirmed_to_user
m141207_001649_create_basic_user_permissions
Apply the above migrations? (yes|no) [no]:yes
*** applying m140608_173539_create_user_table
Exception: Class webvimark\modules\UserManagement\UserManagementModule does not exist (C:\htdocs\base\vendor\yiisoft\yii2\di\Container.php:415)
#0 C:\htdocs\base\vendor\yiisoft\yii2\di\Container.php(415): ReflectionClass->__construct('webvimark\\modul...')
#1 C:\htdocs\base\vendor\yiisoft\yii2\di\Container.php(358): yii\di\Container->getDependencies('webvimark\\modul...')
#2 C:\htdocs\base\vendor\yiisoft\yii2\di\Container.php(151): yii\di\Container->build('webvimark\\modul...', Array, Array)
#3 C:\htdocs\base\vendor\yiisoft\yii2\BaseYii.php(344): yii\di\Container->get('webvimark\\modul...', Array, Array)
#4 C:\htdocs\base\vendor\yiisoft\yii2\base\Module.php(354): yii\BaseYii::createObject(Array, Array)
#5 C:\htdocs\base\vendor\webvimark\module-user-management\migrations\m140608_173539_create_user_table.php(16): yii\base\Module->getModule('user-management')
#6 C:\htdocs\base\vendor\yiisoft\yii2\db\Migration.php(81): m140608_173539_create_user_table->safeUp()
#7 C:\htdocs\base\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(492): yii\db\Migration->up()
#8 C:\htdocs\base\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(129): yii\console\controllers\BaseMigrateController->migrateUp('m140608_173539_...')
#9 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#10 C:\htdocs\base\vendor\yiisoft\yii2\base\InlineAction.php(55): call_user_func_array(Array, Array)
#11 C:\htdocs\base\vendor\yiisoft\yii2\base\Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#12 C:\htdocs\base\vendor\yiisoft\yii2\console\Controller.php(91): yii\base\Controller->runAction('', Array)
#13 C:\htdocs\base\vendor\yiisoft\yii2\base\Module.php(455): yii\console\Controller->runAction('', Array)
#14 C:\htdocs\base\vendor\yiisoft\yii2\console\Application.php(161): yii\base\Module->runAction('migrate', Array)
#15 C:\htdocs\base\vendor\yiisoft\yii2\console\Application.php(137): yii\console\Application->runAction('migrate', Array)
#16 C:\htdocs\base\vendor\yiisoft\yii2\base\Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#17 C:\htdocs\base\yii(23): yii\base\Application->run()
#18 {main}
*** failed to apply m140608_173539_create_user_table (time: 0.111s)
Migration failed. The rest of the migrations are canceled.
c:\htdocs\base>
from user-management.
Did you install it via composer?
If you do, then I'm out of ideas. For some reason composer autoloader could not find clasess.
from user-management.
yes, it's installed via composer :D
I know it's weird situation... :)
from user-management.
And did you try to install via composer and use any other extensions ?
If not try to install something from yii2 extenisons
from user-management.
"c006/yii2-migration-utility": "dev-master"
and works perfectly ;)
from user-management.
Then I really have no idea, sorry =)
from user-management.
after few hours of finding the bug I have no idea too :) maybe later i will find what's wrong ;)
from user-management.
oook. its weird:
'webvimark\\modules\\UserManagement\\' => array($vendorDir . '/webvimark/module-user-management'),
'webvimark\\image\\' => array($vendorDir . '/webvimark/image'),
'webvimark\\helpers\\' => array($vendorDir . '/webvimark/helpers'),
'webvimark\\extensions\\GridPageSize\\' => array($vendorDir . '/webvimark/grid-page-size'),
'webvimark\\extensions\\GridBulkActions\\' => array($vendorDir . '/webvimark/grid-bulk-actions'),
'webvimark\\extensions\\DateRangePicker\\' => array($vendorDir . '/webvimark/date-range-picker'),
'webvimark\\extensions\\BootstrapSwitch\\' => array($vendorDir . '/webvimark/bootstrap-switch'),
'webvimark\\components\\' => array($vendorDir . '/webvimark/components'),
this was missing part in /vendor/composer/autoload_psr4.php
but I don't know why it wasn't added by composer? ;)
from user-management.
And it's working now? @_@
from user-management.
yes, it is now working ;)
from user-management.
Nice ! I'll post it somewhere, because you are not the first one who met this problem :)
from user-management.
Related Issues (20)
- access based on time HOT 1
- Model overwriting HOT 1
- how to stop auto logout? HOT 3
- Is this repository discontinued? HOT 2
- migration failed... HOT 4
- PHP 7.3 compact() issues an E_NOTICE level error HOT 1
- only one login per device can active in one time
- mySQL errors
- DB error when overwriting table names
- How to disable captcha on user registration?
- Migration not working for OCI HOT 2
- hasRole() function doesnt work with children roles
- GhostAccessControl::rules does not exist
- How to combine ghost-access with custom permissions
- $throwException is missing HOT 2
- Issue with Unchecked Routes in Permissions
- PHP Notice on permissions save for PHP 7.4 HOT 3
- Broken Link in FAQs section HOT 1
- Password recovery HOT 1
- compact(): Undefined variable: throwException while saving permission
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from user-management.