{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/25","labels_url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/25/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/25/events","html_url":"https://github.com/yiisoft/yii2-app-advanced/issues/25","id":73702368,"number":25,"title":"user table insecure","user":{"login":"hbschr","id":8751073,"avatar_url":"https://avatars.githubusercontent.com/u/8751073?v=3","gravatar_id":"","url":"https://api.github.com/users/hbschr","html_url":"https://github.com/hbschr","followers_url":"https://api.github.com/users/hbschr/followers","following_url":"https://api.github.com/users/hbschr/following{/other_user}","gists_url":"https://api.github.com/users/hbschr/gists{/gist_id}","starred_url":"https://api.github.com/users/hbschr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbschr/subscriptions","organizations_url":"https://api.github.com/users/hbschr/orgs","repos_url":"https://api.github.com/users/hbschr/repos","events_url":"https://api.github.com/users/hbschr/events{/privacy}","received_events_url":"https://api.github.com/users/hbschr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-06T18:36:14Z","updated_at":"2015-05-08T21:39:43Z","closed_at":null,"body":"in table `user` the columns `username` and `password_reset_token` should be given an unique key. otherwise the implementations of `findByUsername` and `findByPasswordResetToken` could return unexpected results."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/comments/100375602","html_url":"https://github.com/yiisoft/yii2-app-advanced/issues/25#issuecomment-100375602","issue_url":"https://api.github.com/repos/yiisoft/yii2-app-advanced/issues/25","id":100375602,"user":{"login":"hbschr","id":8751073,"avatar_url":"https://avatars.githubusercontent.com/u/8751073?v=3","gravatar_id":"","url":"https://api.github.com/users/hbschr","html_url":"https://github.com/hbschr","followers_url":"https://api.github.com/users/hbschr/followers","following_url":"https://api.github.com/users/hbschr/following{/other_user}","gists_url":"https://api.github.com/users/hbschr/gists{/gist_id}","starred_url":"https://api.github.com/users/hbschr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbschr/subscriptions","organizations_url":"https://api.github.com/users/hbschr/orgs","repos_url":"https://api.github.com/users/hbschr/repos","events_url":"https://api.github.com/users/hbschr/events{/privacy}","received_events_url":"https://api.github.com/users/hbschr/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T21:39:43Z","updated_at":"2015-05-08T21:39:43Z","body":"to prevent confusion: i wasn't talking about `auth_key` for \"rember Me\" cookie. i was talking about the columns which are used in any kind of `findBy*`. afaik these are `user.username` and `user.password_reset_token`.\r\n\r\nsince uniqueness is ensured in php code @githubjeka is right: this issue could be closed. personally i agree with @cebe (ensuring uniqueness on db level in case of bugs in php code), but decision is yours ;-)"}}