amnah / yii2-user

Yii2 user authentication module
MIT License
253 stars 104 forks source link

Call to undefined method amnah\yii2\user\components\User::findIdentity() #81

Closed ajkosh closed 9 years ago

ajkosh commented 9 years ago

in basic app i m getting this after install

amnah commented 9 years ago

What's your config?

ajkosh commented 9 years ago

this is my confgi file <?php

$params = require(DIR . '/params.php');

$config = [ 'id' => 'basic', 'basePath' => dirname(DIR), 'bootstrap' => ['log'], 'modules' => [ 'user' => [ 'class' => 'amnah\yii2\user\Module', // set custom module properties here ... ], ], 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'KAizUcc7tjKN0LAK_nSxn7cmd5anjbs2', ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], // 'user' => [ // 'identityClass' => 'app\models\User', // 'enableAutoLogin' => false, // ], 'user' => [ 'identityClass' => 'amnah\yii2\user\components\User', ], 'errorHandler' => [ 'errorAction' => 'site/error', ], // 'mailer' => [ // 'class' => 'yii\swiftmailer\Mailer', // // send all mails to a file by default. You have to set // // 'useFileTransport' to false and configure a transport // // for the mailer to send real emails. // 'useFileTransport' => true, // ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'useFileTransport' => true, 'messageConfig' => [ 'from' => ['admin@website.com' => 'Admin'], // this is needed for sending emails 'charset' => 'UTF-8', ] ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => require(DIR . '/db.php'), // 'urlManager' => [ // 'enablePrettyUrl' => true, // 'showScriptName' => false, // ], ],

'params' => $params,

];

if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment //$config['bootstrap'][] = 'debug'; //$config['modules']['debug'] = 'yii\debug\Module';

$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = 'yii\gii\Module';

}

return $config;

ajkosh commented 9 years ago

thnku for ur reply plz if u can help ,i need this.

amnah commented 9 years ago

Ahh, I see. Try this:

'user' => [
    'identityClass' => 'amnah\yii2\user\components\User',
],

should be

'user' => [
    'class' => 'amnah\yii2\user\components\User',
],
ajkosh commented 9 years ago

ok i try this

ajkosh commented 9 years ago

this error is coming Calling unknown method: app\models\User::updateLoginMeta()

ajkosh commented 9 years ago

in login page facebook auth is not showing

amnah commented 9 years ago

what version do you have installed? you can check by going to /user On Mar 22, 2015 2:56 PM, "ajkosh" notifications@github.com wrote:

in login page facebook auth is not showing

— Reply to this email directly or view it on GitHub https://github.com/amnah/yii2-user/issues/81#issuecomment-84674744.

ajkosh commented 9 years ago

it is latest version but i checked in firebug i have missed authchoice.css and authchoice.js files how to get those files

amnah commented 9 years ago

hmm how did you install the module? if you installed it via composer it should've installed yii2-authclient as well

at this point maybe you should try a fresh installation, something messed up... On Mar 22, 2015 3:04 PM, "ajkosh" notifications@github.com wrote:

it is latest version but i checked in firebug i have missed authchoice.css and authchoice.js files how to get those files

— Reply to this email directly or view it on GitHub https://github.com/amnah/yii2-user/issues/81#issuecomment-84678414.

ajkosh commented 9 years ago

i installed from composer thnku i try again ,but can u tell me i m using yii2 admin rbac how to use

amnah commented 9 years ago

Sorry but I've never used that module. You'll have to ask them for help

ajkosh commented 9 years ago

can u tell me how ur confirm is working,i mean how you call action call confirm from email confirmation link.

amnah commented 9 years ago

I'm not sure what you mean... It just calls the action in the controller

ajkosh commented 9 years ago

how this action you are calling,from where it is calling,that i want to know ?

amnah commented 9 years ago

Where the link is generated? Here