{"action":"created","issue":{"url":"https://api.github.com/repos/AgelxNash/DocLister/issues/127","labels_url":"https://api.github.com/repos/AgelxNash/DocLister/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/AgelxNash/DocLister/issues/127/comments","events_url":"https://api.github.com/repos/AgelxNash/DocLister/issues/127/events","html_url":"https://github.com/AgelxNash/DocLister/issues/127","id":61956594,"number":127,"title":"modUsers - ошибка в методе edit();","user":{"login":"Pathologic","id":3012304,"avatar_url":"https://avatars.githubusercontent.com/u/3012304?v=3","gravatar_id":"","url":"https://api.github.com/users/Pathologic","html_url":"https://github.com/Pathologic","followers_url":"https://api.github.com/users/Pathologic/followers","following_url":"https://api.github.com/users/Pathologic/following{/other_user}","gists_url":"https://api.github.com/users/Pathologic/gists{/gist_id}","starred_url":"https://api.github.com/users/Pathologic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pathologic/subscriptions","organizations_url":"https://api.github.com/users/Pathologic/orgs","repos_url":"https://api.github.com/users/Pathologic/repos","events_url":"https://api.github.com/users/Pathologic/events{/privacy}","received_events_url":"https://api.github.com/users/Pathologic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AgelxNash/DocLister/labels/%D0%9D%D0%B5%20%D0%BF%D0%BE%D0%B4%D1%82%D0%B2%D0%B5%D1%80%D0%B6%D0%B4%D0%B5%D0%BD%D0%BE","name":"Не подтверждено","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":{"login":"AgelxNash","id":1748872,"avatar_url":"https://avatars.githubusercontent.com/u/1748872?v=3","gravatar_id":"","url":"https://api.github.com/users/AgelxNash","html_url":"https://github.com/AgelxNash","followers_url":"https://api.github.com/users/AgelxNash/followers","following_url":"https://api.github.com/users/AgelxNash/following{/other_user}","gists_url":"https://api.github.com/users/AgelxNash/gists{/gist_id}","starred_url":"https://api.github.com/users/AgelxNash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgelxNash/subscriptions","organizations_url":"https://api.github.com/users/AgelxNash/orgs","repos_url":"https://api.github.com/users/AgelxNash/repos","events_url":"https://api.github.com/users/AgelxNash/events{/privacy}","received_events_url":"https://api.github.com/users/AgelxNash/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-03-16T03:24:13Z","updated_at":"2015-03-18T21:37:36Z","closed_at":"2015-03-18T21:37:36Z","body":"https://github.com/AgelxNash/DocLister/blob/master/assets/lib/MODxAPI/modUsers.php#L80 - не проверяется результат запроса, поэтому даже если пользователь не найден по корректному $id, то метод все равно вернет объект вместо false."},"comment":{"url":"https://api.github.com/repos/AgelxNash/DocLister/issues/comments/83191281","html_url":"https://github.com/AgelxNash/DocLister/issues/127#issuecomment-83191281","issue_url":"https://api.github.com/repos/AgelxNash/DocLister/issues/127","id":83191281,"user":{"login":"AgelxNash","id":1748872,"avatar_url":"https://avatars.githubusercontent.com/u/1748872?v=3","gravatar_id":"","url":"https://api.github.com/users/AgelxNash","html_url":"https://github.com/AgelxNash","followers_url":"https://api.github.com/users/AgelxNash/followers","following_url":"https://api.github.com/users/AgelxNash/following{/other_user}","gists_url":"https://api.github.com/users/AgelxNash/gists{/gist_id}","starred_url":"https://api.github.com/users/AgelxNash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgelxNash/subscriptions","organizations_url":"https://api.github.com/users/AgelxNash/orgs","repos_url":"https://api.github.com/users/AgelxNash/repos","events_url":"https://api.github.com/users/AgelxNash/events{/privacy}","received_events_url":"https://api.github.com/users/AgelxNash/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T21:37:36Z","updated_at":"2015-03-18T21:37:36Z","body":"Вспомнил я с какой целью это делалось. Идея была такая, чтобы после вызова метода ->edit() не приходилось разывать цепочку. \r\nСейчас можно написать так\r\n```php\r\n$user->edit(10)->set('blocked', 1)->save(true, true);\r\n```\r\nВ то время, как если edit будет возвращать то объект, то false. Придется делать как-то так\r\n```php\r\nif($user->edit(10) !== false) $user->set('blocked', 1)->save(true, true);\r\n```\r\n\r\nВ общем если после открытия записи требуется проверить - существует ли она, то нужно использовать метод ->getID().\r\n\r\nТак что это не баг, а такой хардкорный синтаксический сахар)"}}