Comments (4)
Shouldn't it just be $model->user->id
? I'm not sure what that "relation" is doing there.
Did you update the yii2 framework as well? Seems like this could be caused by a change of the core framework api.
from yii2-user.
$model->user->id also give me an exception...
#39;Trying to get property of non-object&#
If you say it's because a change in Yii2 I'll look there, thanks.
from yii2-user.
Here's an example of what the relation function should look like:
/**
* @return \yii\db\ActiveQuery
*/
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
}
If that doesn't work, then you probably need to check the database.
from yii2-user.
I'm sorry, the problem was a a new behavior. Thanks!
from yii2-user.
Related Issues (20)
- sendRecoverypassword gets exception 'yii\web\NotAcceptableHttpException' HOT 1
- I would like to extend a BaseController but the \amnah\yii2\user\controllers\* extend Controller HOT 2
- How to get Full Name? HOT 2
- $this->module does not return module, breaks code HOT 1
- Getting unknown property: amnah\yii2\user\models\Role::can_? HOT 3
- Keep Social Login but disable Social Registration HOT 4
- Change auth_key when have a new password HOT 2
- redirect homeUrl if user is loginned,access user/login HOT 2
- Display the authorization module on the main page? HOT 3
- one social account can bind more users? HOT 1
- exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: app\models\Profile::email
- View file not found HOT 5
- Compatibility with HttpBasicAuth? HOT 2
- Login screen management HOT 1
- How to Authenticate Through Rest API with YII2User? HOT 3
- [ask] support PHP 8.1? HOT 1
- Unable to store the data back into the database HOT 1
- How to get in touch regarding a security concern
- Getting unknown property: amnah\yii2\user\models\forms\LoginForm::username HOT 2
- [ask] Auth Google HOT 1
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 yii2-user.