{"action":"created","issue":{"url":"https://api.github.com/repos/humhub/humhub/issues/2683","repository_url":"https://api.github.com/repos/humhub/humhub","labels_url":"https://api.github.com/repos/humhub/humhub/issues/2683/labels{/name}","comments_url":"https://api.github.com/repos/humhub/humhub/issues/2683/comments","events_url":"https://api.github.com/repos/humhub/humhub/issues/2683/events","html_url":"https://github.com/humhub/humhub/issues/2683","id":246296604,"number":2683,"title":"Wrong ContentContainer's 'class' value when creating a new User if the User's identity is overridden ","user":{"login":"devantoine","id":1639739,"avatar_url":"https://avatars3.githubusercontent.com/u/1639739?v=4","gravatar_id":"","url":"https://api.github.com/users/devantoine","html_url":"https://github.com/devantoine","followers_url":"https://api.github.com/users/devantoine/followers","following_url":"https://api.github.com/users/devantoine/following{/other_user}","gists_url":"https://api.github.com/users/devantoine/gists{/gist_id}","starred_url":"https://api.github.com/users/devantoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devantoine/subscriptions","organizations_url":"https://api.github.com/users/devantoine/orgs","repos_url":"https://api.github.com/users/devantoine/repos","events_url":"https://api.github.com/users/devantoine/events{/privacy}","received_events_url":"https://api.github.com/users/devantoine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2017-07-28T09:35:43Z","updated_at":"2017-08-07T09:21:59Z","closed_at":null,"body":"Hi,\r\n\r\nIf I understand correctly how the `contentcontainer` table is supposed to work, when adding a new user, the `class` value for the corresponding user should be the one returned by `Yii::$app->user->getIdentity()`.\r\n\r\nThe issue is: when you create a new user, the associated `contentcontainer` record has a `class` value of `humhub\\modules\\user\\models\\User`, not the actual class being used (defined with the `identityClass` parameter in `config/common.php`).\r\n\r\nThis causes a lot of issues because when a user creates a content, `Content::setContainer()` can't work: `$this->contentcontainer_id` is always null because `ContentContainerActiveRecord::getContentContainerRecord()` returns null (`self::className()` returning `humhub\\modules\\user\\models\\User` and not the actual overridden class).\r\n\r\nIs there a way to change this behavior or this is a bug which needs to be fixed asap?\r\n\r\nHumHub version: 1.2.1."},"comment":{"url":"https://api.github.com/repos/humhub/humhub/issues/comments/320614375","html_url":"https://github.com/humhub/humhub/issues/2683#issuecomment-320614375","issue_url":"https://api.github.com/repos/humhub/humhub/issues/2683","id":320614375,"user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars3.githubusercontent.com/u/874234?v=4","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"created_at":"2017-08-07T09:21:59Z","updated_at":"2017-08-07T09:21:59Z","body":"Try add a behavior with\r\n```php\r\npublick function getProfile() {\r\n// doing what you need before\r\n$this->owner->getProfile();\r\n// doing what you need after\r\n}\r\n```"}}
{"actor":{"display_login":"githubjeka"}}