{"action":"created","comment":{"url":"https://api.github.com/repos/ox-it/wl-user/pulls/comments/52012239","id":52012239,"diff_hunk":"@@ -806,12 +806,15 @@ public void doSave(RunData data, Context context)\n \n \t\t// commit the change\n \t\tUserEdit edit = (UserEdit) state.getAttribute(\"user\");\n+\t\tString valueEmail = (String)state.getAttribute(\"valueEmail\");\n+\t\tString oldEmail = (String)state.getAttribute(\"oldEmail\");\n \t\tif (edit != null)\n \t\t{\n \t\t\ttry\n \t\t\t{\n-\t\t\t\tString valueEmail = (String)state.getAttribute(\"valueEmail\");\n-\t\t\t\tif (StringUtils.trimToNull(valueEmail) != null && EmailValidator.getInstance().isValid(edit.getEid()) && !edit.getEid().equalsIgnoreCase(valueEmail)) {\n+\t\t\t\t//start this validation only when user has changed the email for the account else skip, also skip for admin user\n+\t\t\t\tif (!SecurityService.isSuperUser() && StringUtils.trimToNull(valueEmail) != null && StringUtils.trimToNull(oldEmail) != null && !(oldEmail.equals(valueEmail))","path":"user-tool/tool/src/java/org/sakaiproject/user/tool/UsersAction.java","position":13,"original_position":13,"commit_id":"7e1127181634e0ae4228b7cbd6516e1052fcee63","original_commit_id":"7e1127181634e0ae4228b7cbd6516e1052fcee63","user":{"login":"ouit0408","id":13135327,"avatar_url":"https://avatars.githubusercontent.com/u/13135327?v=3","gravatar_id":"","url":"https://api.github.com/users/ouit0408","html_url":"https://github.com/ouit0408","followers_url":"https://api.github.com/users/ouit0408/followers","following_url":"https://api.github.com/users/ouit0408/following{/other_user}","gists_url":"https://api.github.com/users/ouit0408/gists{/gist_id}","starred_url":"https://api.github.com/users/ouit0408/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ouit0408/subscriptions","organizations_url":"https://api.github.com/users/ouit0408/orgs","repos_url":"https://api.github.com/users/ouit0408/repos","events_url":"https://api.github.com/users/ouit0408/events{/privacy}","received_events_url":"https://api.github.com/users/ouit0408/received_events","type":"User","site_admin":false},"body":"oldEmail can be null as it is set in the state only when user has changed his email otherwise it will be null.","created_at":"2016-02-05T12:56:23Z","updated_at":"2016-02-05T12:56:23Z","html_url":"https://github.com/ox-it/wl-user/pull/8#discussion_r52012239","pull_request_url":"https://api.github.com/repos/ox-it/wl-user/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/comments/52012239"},"html":{"href":"https://github.com/ox-it/wl-user/pull/8#discussion_r52012239"},"pull_request":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/ox-it/wl-user/pulls/8","id":58278522,"html_url":"https://github.com/ox-it/wl-user/pull/8","diff_url":"https://github.com/ox-it/wl-user/pull/8.diff","patch_url":"https://github.com/ox-it/wl-user/pull/8.patch","issue_url":"https://api.github.com/repos/ox-it/wl-user/issues/8","number":8,"state":"closed","locked":false,"title":"WL-4250 Users can change the password in Accounts tool.","user":{"login":"ouit0408","id":13135327,"avatar_url":"https://avatars.githubusercontent.com/u/13135327?v=3","gravatar_id":"","url":"https://api.github.com/users/ouit0408","html_url":"https://github.com/ouit0408","followers_url":"https://api.github.com/users/ouit0408/followers","following_url":"https://api.github.com/users/ouit0408/following{/other_user}","gists_url":"https://api.github.com/users/ouit0408/gists{/gist_id}","starred_url":"https://api.github.com/users/ouit0408/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ouit0408/subscriptions","organizations_url":"https://api.github.com/users/ouit0408/orgs","repos_url":"https://api.github.com/users/ouit0408/repos","events_url":"https://api.github.com/users/ouit0408/events{/privacy}","received_events_url":"https://api.github.com/users/ouit0408/received_events","type":"User","site_admin":false},"body":"Now no two external users can have same email address, kept the unique\r\nemail functionality as 'password-rest' tool will not work otherwise.\r\nIn  UserAction class checking for email change by user before actually\r\nchecking for existing account with the new email.\r\nSimilarly, creating validation account only if email is changed to a new\r\nunique email address.","created_at":"2016-02-04T12:16:44Z","updated_at":"2016-02-05T12:56:23Z","closed_at":"2016-02-05T12:53:33Z","merged_at":"2016-02-05T12:53:33Z","merge_commit_sha":"b580429c53df5170bd6662fcd2a4b16f6d478830","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ox-it/wl-user/pulls/8/commits","review_comments_url":"https://api.github.com/repos/ox-it/wl-user/pulls/8/comments","review_comment_url":"https://api.github.com/repos/ox-it/wl-user/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ox-it/wl-user/issues/8/comments","statuses_url":"https://api.github.com/repos/ox-it/wl-user/statuses/7e1127181634e0ae4228b7cbd6516e1052fcee63","head":{"label":"ox-it:WL-4250","ref":"WL-4250","sha":"7e1127181634e0ae4228b7cbd6516e1052fcee63","user":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"repo":{"id":6059134,"name":"wl-user","full_name":"ox-it/wl-user","owner":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ox-it/wl-user","description":null,"fork":false,"url":"https://api.github.com/repos/ox-it/wl-user","forks_url":"https://api.github.com/repos/ox-it/wl-user/forks","keys_url":"https://api.github.com/repos/ox-it/wl-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ox-it/wl-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ox-it/wl-user/teams","hooks_url":"https://api.github.com/repos/ox-it/wl-user/hooks","issue_events_url":"https://api.github.com/repos/ox-it/wl-user/issues/events{/number}","events_url":"https://api.github.com/repos/ox-it/wl-user/events","assignees_url":"https://api.github.com/repos/ox-it/wl-user/assignees{/user}","branches_url":"https://api.github.com/repos/ox-it/wl-user/branches{/branch}","tags_url":"https://api.github.com/repos/ox-it/wl-user/tags","blobs_url":"https://api.github.com/repos/ox-it/wl-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ox-it/wl-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ox-it/wl-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/ox-it/wl-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ox-it/wl-user/statuses/{sha}","languages_url":"https://api.github.com/repos/ox-it/wl-user/languages","stargazers_url":"https://api.github.com/repos/ox-it/wl-user/stargazers","contributors_url":"https://api.github.com/repos/ox-it/wl-user/contributors","subscribers_url":"https://api.github.com/repos/ox-it/wl-user/subscribers","subscription_url":"https://api.github.com/repos/ox-it/wl-user/subscription","commits_url":"https://api.github.com/repos/ox-it/wl-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/ox-it/wl-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/ox-it/wl-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/ox-it/wl-user/issues/comments{/number}","contents_url":"https://api.github.com/repos/ox-it/wl-user/contents/{+path}","compare_url":"https://api.github.com/repos/ox-it/wl-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ox-it/wl-user/merges","archive_url":"https://api.github.com/repos/ox-it/wl-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ox-it/wl-user/downloads","issues_url":"https://api.github.com/repos/ox-it/wl-user/issues{/number}","pulls_url":"https://api.github.com/repos/ox-it/wl-user/pulls{/number}","milestones_url":"https://api.github.com/repos/ox-it/wl-user/milestones{/number}","notifications_url":"https://api.github.com/repos/ox-it/wl-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ox-it/wl-user/labels{/name}","releases_url":"https://api.github.com/repos/ox-it/wl-user/releases{/id}","deployments_url":"https://api.github.com/repos/ox-it/wl-user/deployments","created_at":"2012-10-03T11:34:53Z","updated_at":"2016-01-19T11:40:07Z","pushed_at":"2016-02-05T12:53:35Z","git_url":"git://github.com/ox-it/wl-user.git","ssh_url":"git@github.com:ox-it/wl-user.git","clone_url":"https://github.com/ox-it/wl-user.git","svn_url":"https://github.com/ox-it/wl-user","homepage":null,"size":1101,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"sakai-10.x"}},"base":{"label":"ox-it:sakai-10.x","ref":"sakai-10.x","sha":"d527c47b5f04f9f2416d9c7f2dad63773eb5c2f1","user":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"repo":{"id":6059134,"name":"wl-user","full_name":"ox-it/wl-user","owner":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ox-it/wl-user","description":null,"fork":false,"url":"https://api.github.com/repos/ox-it/wl-user","forks_url":"https://api.github.com/repos/ox-it/wl-user/forks","keys_url":"https://api.github.com/repos/ox-it/wl-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ox-it/wl-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ox-it/wl-user/teams","hooks_url":"https://api.github.com/repos/ox-it/wl-user/hooks","issue_events_url":"https://api.github.com/repos/ox-it/wl-user/issues/events{/number}","events_url":"https://api.github.com/repos/ox-it/wl-user/events","assignees_url":"https://api.github.com/repos/ox-it/wl-user/assignees{/user}","branches_url":"https://api.github.com/repos/ox-it/wl-user/branches{/branch}","tags_url":"https://api.github.com/repos/ox-it/wl-user/tags","blobs_url":"https://api.github.com/repos/ox-it/wl-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ox-it/wl-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ox-it/wl-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/ox-it/wl-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ox-it/wl-user/statuses/{sha}","languages_url":"https://api.github.com/repos/ox-it/wl-user/languages","stargazers_url":"https://api.github.com/repos/ox-it/wl-user/stargazers","contributors_url":"https://api.github.com/repos/ox-it/wl-user/contributors","subscribers_url":"https://api.github.com/repos/ox-it/wl-user/subscribers","subscription_url":"https://api.github.com/repos/ox-it/wl-user/subscription","commits_url":"https://api.github.com/repos/ox-it/wl-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/ox-it/wl-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/ox-it/wl-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/ox-it/wl-user/issues/comments{/number}","contents_url":"https://api.github.com/repos/ox-it/wl-user/contents/{+path}","compare_url":"https://api.github.com/repos/ox-it/wl-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ox-it/wl-user/merges","archive_url":"https://api.github.com/repos/ox-it/wl-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ox-it/wl-user/downloads","issues_url":"https://api.github.com/repos/ox-it/wl-user/issues{/number}","pulls_url":"https://api.github.com/repos/ox-it/wl-user/pulls{/number}","milestones_url":"https://api.github.com/repos/ox-it/wl-user/milestones{/number}","notifications_url":"https://api.github.com/repos/ox-it/wl-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ox-it/wl-user/labels{/name}","releases_url":"https://api.github.com/repos/ox-it/wl-user/releases{/id}","deployments_url":"https://api.github.com/repos/ox-it/wl-user/deployments","created_at":"2012-10-03T11:34:53Z","updated_at":"2016-01-19T11:40:07Z","pushed_at":"2016-02-05T12:53:35Z","git_url":"git://github.com/ox-it/wl-user.git","ssh_url":"git@github.com:ox-it/wl-user.git","clone_url":"https://github.com/ox-it/wl-user.git","svn_url":"https://github.com/ox-it/wl-user","homepage":null,"size":1101,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"sakai-10.x"}},"_links":{"self":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/8"},"html":{"href":"https://github.com/ox-it/wl-user/pull/8"},"issue":{"href":"https://api.github.com/repos/ox-it/wl-user/issues/8"},"comments":{"href":"https://api.github.com/repos/ox-it/wl-user/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ox-it/wl-user/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/ox-it/wl-user/statuses/7e1127181634e0ae4228b7cbd6516e1052fcee63"}}}}