{"action":"opened","issue":{"url":"https://api.github.com/repos/NIFTYCloud-mbaas/UserCommunity/issues/464","repository_url":"https://api.github.com/repos/NIFTYCloud-mbaas/UserCommunity","labels_url":"https://api.github.com/repos/NIFTYCloud-mbaas/UserCommunity/issues/464/labels{/name}","comments_url":"https://api.github.com/repos/NIFTYCloud-mbaas/UserCommunity/issues/464/comments","events_url":"https://api.github.com/repos/NIFTYCloud-mbaas/UserCommunity/issues/464/events","html_url":"https://github.com/NIFTYCloud-mbaas/UserCommunity/issues/464","id":158517597,"number":464,"title":"Unityの会員ロール追加のドキュメントが間違っている","user":{"login":"TORISOUP","id":861868,"avatar_url":"https://avatars.githubusercontent.com/u/861868?v=3","gravatar_id":"","url":"https://api.github.com/users/TORISOUP","html_url":"https://github.com/TORISOUP","followers_url":"https://api.github.com/users/TORISOUP/followers","following_url":"https://api.github.com/users/TORISOUP/following{/other_user}","gists_url":"https://api.github.com/users/TORISOUP/gists{/gist_id}","starred_url":"https://api.github.com/users/TORISOUP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TORISOUP/subscriptions","organizations_url":"https://api.github.com/users/TORISOUP/orgs","repos_url":"https://api.github.com/users/TORISOUP/repos","events_url":"https://api.github.com/users/TORISOUP/events{/privacy}","received_events_url":"https://api.github.com/users/TORISOUP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-04T18:35:03Z","updated_at":"2016-06-04T18:35:03Z","closed_at":null,"body":"http://mb.cloud.nifty.com/doc/current/sdkguide/unity/role.html#会員をロールに追加する\r\n\r\n既存の会員ロールにユーザを追加する場合ですが、NCMBRoleをnewしてしまうとロールごと新規作成になるので失敗してしまいます。\r\n以下の方法が正しいのではないでしょうか？\r\n\r\n```\r\n\r\nNCMBUser expertUser = new NCMBUser();\r\nexpertUser.UserName = \"expertUser\";\r\nexpertUser.Password = \"pass\";\r\nexpertUser.SignUpAsync((NCMBException e) => {\r\n    if (e != null)\r\n    {\r\n        //エラー処理\r\n    }\r\n    else {\r\n        NCMBRole.GetQuery().WhereEqualTo(\"roleName\", \"expertPlan\")\r\n        .FindAsync((roleList, error) =>\r\n        {\r\n            var role = roleList.FirstOrDefault();\r\n            role.Users.Add(expertUser);\r\n            role.SaveAsync();\r\n        });\r\n    }\r\n});\r\n```"}}
{"actor":{"display_login":"TORISOUP"}}