GitHub PullRequestReviewCommentEvent at 2014-11-20 09:11:32
Repository: forkcms
Actor: WouterSioen
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/20634154","id":20634154,"diff_hunk":"@@ -737,6 +737,115 @@ public static function insertProfileGroup(array $values)\n         return (int) BackendModel::getContainer()->get('database')->insert('profiles_groups_rights', $values);\n     }\n \n+\t/**\n+\t * Notify profile - after adding profile to profiles module\n+\t *\n+\t * @param array $values\n+\t */\n+\tpublic static function notifyNewProfile($values)\n+\t{\n+\t\t// set variables\n+\t\t$variables['message'] = vsprintf(\n+\t\t    BL::msg('NotificationNewProfileToProfile', 'Profiles'),\n+\t\t    array(\n+\t\t        $values['email'],\n+\t\t        $values['unencrypted_password'],\n+\t\t        SITE_URL\n+\t\t    )\n+\t\t);\n+\t\t\n+\t\t// define subject\n+\t\t$subject = BL::lbl('NotificationNewProfileToProfile', 'Profiles');\n+\n+\t\t// define template path\n+\t\t$templatePath = FRONTEND_CORE_PATH . '/Layout/Templates/Mails/Notification.tpl';\n+\n+\t\t// send the mail\n+\t\tBackendModel::get('mailer')->addEmail(\n+\t\t    $subject,\n+\t\t    $templatePath,\n+\t\t    $variables,\n+\t\t    $values['email'],\n+\t\t    $values['display_name']\n+\t\t);\n+\t}\n+\n+\t/**\n+\t * Notify admin - after adding profile to profiles module\n+\t *\n+\t * @param array $values\n+\t */\n+\tpublic static function notifyNewProfileToAdmin($values)\n+\t{\n+\t    // to email\n+\t    $toEmail = BackendModel::getModuleSetting('profiles', 'profile_notification_email', null);","path":"src/Backend/Modules/Profiles/Engine/Model.php","position":45,"original_position":45,"commit_id":"a78061b413ab6775ea19ba5ab726c8157a65e802","original_commit_id":"a78061b413ab6775ea19ba5ab726c8157a65e802","user":{"login":"WouterSioen","id":1398405,"avatar_url":"https://avatars.githubusercontent.com/u/1398405?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterSioen","html_url":"https://github.com/WouterSioen","followers_url":"https://api.github.com/users/WouterSioen/followers","following_url":"https://api.github.com/users/WouterSioen/following{/other_user}","gists_url":"https://api.github.com/users/WouterSioen/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterSioen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterSioen/subscriptions","organizations_url":"https://api.github.com/users/WouterSioen/orgs","repos_url":"https://api.github.com/users/WouterSioen/repos","events_url":"https://api.github.com/users/WouterSioen/events{/privacy}","received_events_url":"https://api.github.com/users/WouterSioen/received_events","type":"User","site_admin":false},"body":"The module is called Profiles, not 'profiles'. ","created_at":"2014-11-20T09:11:32Z","updated_at":"2014-11-20T09:11:32Z","html_url":"https://github.com/forkcms/forkcms/pull/971#discussion_r20634154","pull_request_url":"https://api.github.com/repos/forkcms/forkcms/pulls/971","_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/20634154"},"html":{"href":"https://github.com/forkcms/forkcms/pull/971#discussion_r20634154"},"pull_request":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/971"}}},"pull_request":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/971","id":24699177,"html_url":"https://github.com/forkcms/forkcms/pull/971","diff_url":"https://github.com/forkcms/forkcms/pull/971.diff","patch_url":"https://github.com/forkcms/forkcms/pull/971.patch","issue_url":"https://api.github.com/repos/forkcms/forkcms/issues/971","number":971,"state":"open","locked":false,"title":"Fixes #649 profile notifications","user":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars.githubusercontent.com/u/588616?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"body":"## Solves the following problems\r\n\r\n* Lots of clients want to be notified when a new profile has been added manually.\r\n* Lots of clients want the new profile to automatically receive an e-mail containing login credentials, when the profile has been added/updated manually by a Fork CMS user.\r\n* When \"automailing to profile\" is activated, it is also possible to let the \"password\" field empty. Because the password can now be auto-generated behind the scene and mailed to the profile.\r\n\r\nMore info: #649 ","created_at":"2014-11-19T16:09:08Z","updated_at":"2014-11-20T09:11:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"014d94864c3bf446c375e4b44bab2e33b3227588","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/forkcms/forkcms/pulls/971/commits","review_comments_url":"https://api.github.com/repos/forkcms/forkcms/pulls/971/comments","review_comment_url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/{number}","comments_url":"https://api.github.com/repos/forkcms/forkcms/issues/971/comments","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/a78061b413ab6775ea19ba5ab726c8157a65e802","head":{"label":"jeroendesloovere:fixes-#649-profile-notifications","ref":"fixes-#649-profile-notifications","sha":"a78061b413ab6775ea19ba5ab726c8157a65e802","user":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars.githubusercontent.com/u/588616?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"repo":{"id":18802379,"name":"forkcms","full_name":"jeroendesloovere/forkcms","owner":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars.githubusercontent.com/u/588616?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeroendesloovere/forkcms","description":"Fork is an open source CMS.","fork":true,"url":"https://api.github.com/repos/jeroendesloovere/forkcms","forks_url":"https://api.github.com/repos/jeroendesloovere/forkcms/forks","keys_url":"https://api.github.com/repos/jeroendesloovere/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeroendesloovere/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeroendesloovere/forkcms/teams","hooks_url":"https://api.github.com/repos/jeroendesloovere/forkcms/hooks","issue_events_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/jeroendesloovere/forkcms/events","assignees_url":"https://api.github.com/repos/jeroendesloovere/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/jeroendesloovere/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/jeroendesloovere/forkcms/tags","blobs_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeroendesloovere/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/jeroendesloovere/forkcms/languages","stargazers_url":"https://api.github.com/repos/jeroendesloovere/forkcms/stargazers","contributors_url":"https://api.github.com/repos/jeroendesloovere/forkcms/contributors","subscribers_url":"https://api.github.com/repos/jeroendesloovere/forkcms/subscribers","subscription_url":"https://api.github.com/repos/jeroendesloovere/forkcms/subscription","commits_url":"https://api.github.com/repos/jeroendesloovere/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeroendesloovere/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues/comments/{number}","contents_url":"https://api.github.com/repos/jeroendesloovere/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/jeroendesloovere/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeroendesloovere/forkcms/merges","archive_url":"https://api.github.com/repos/jeroendesloovere/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeroendesloovere/forkcms/downloads","issues_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/jeroendesloovere/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/jeroendesloovere/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/jeroendesloovere/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeroendesloovere/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/jeroendesloovere/forkcms/releases{/id}","created_at":"2014-04-15T14:08:29Z","updated_at":"2014-11-19T08:15:31Z","pushed_at":"2014-11-20T07:38:19Z","git_url":"git://github.com/jeroendesloovere/forkcms.git","ssh_url":"git@github.com:jeroendesloovere/forkcms.git","clone_url":"https://github.com/jeroendesloovere/forkcms.git","svn_url":"https://github.com/jeroendesloovere/forkcms","homepage":"http://www.fork-cms.com","size":32033,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"forkcms:master","ref":"master","sha":"8e629021c2bf3e68e04d41f4b722f416a3fb6fa9","user":{"login":"forkcms","id":312505,"avatar_url":"https://avatars.githubusercontent.com/u/312505?v=3","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"repo":{"id":1138583,"name":"forkcms","full_name":"forkcms/forkcms","owner":{"login":"forkcms","id":312505,"avatar_url":"https://avatars.githubusercontent.com/u/312505?v=3","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/forkcms/forkcms","description":"Fork is an open source CMS.","fork":false,"url":"https://api.github.com/repos/forkcms/forkcms","forks_url":"https://api.github.com/repos/forkcms/forkcms/forks","keys_url":"https://api.github.com/repos/forkcms/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forkcms/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forkcms/forkcms/teams","hooks_url":"https://api.github.com/repos/forkcms/forkcms/hooks","issue_events_url":"https://api.github.com/repos/forkcms/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/forkcms/forkcms/events","assignees_url":"https://api.github.com/repos/forkcms/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/forkcms/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/forkcms/forkcms/tags","blobs_url":"https://api.github.com/repos/forkcms/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forkcms/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forkcms/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/forkcms/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/forkcms/forkcms/languages","stargazers_url":"https://api.github.com/repos/forkcms/forkcms/stargazers","contributors_url":"https://api.github.com/repos/forkcms/forkcms/contributors","subscribers_url":"https://api.github.com/repos/forkcms/forkcms/subscribers","subscription_url":"https://api.github.com/repos/forkcms/forkcms/subscription","commits_url":"https://api.github.com/repos/forkcms/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/forkcms/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/forkcms/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/forkcms/forkcms/issues/comments/{number}","contents_url":"https://api.github.com/repos/forkcms/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/forkcms/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forkcms/forkcms/merges","archive_url":"https://api.github.com/repos/forkcms/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forkcms/forkcms/downloads","issues_url":"https://api.github.com/repos/forkcms/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/forkcms/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/forkcms/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/forkcms/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forkcms/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/forkcms/forkcms/releases{/id}","created_at":"2010-12-04T18:06:15Z","updated_at":"2014-11-18T13:57:14Z","pushed_at":"2014-11-18T15:05:53Z","git_url":"git://github.com/forkcms/forkcms.git","ssh_url":"git@github.com:forkcms/forkcms.git","clone_url":"https://github.com/forkcms/forkcms.git","svn_url":"https://github.com/forkcms/forkcms","homepage":"http://www.fork-cms.com","size":64100,"stargazers_count":812,"watchers_count":812,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":232,"mirror_url":null,"open_issues_count":107,"forks":232,"open_issues":107,"watchers":812,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/971"},"html":{"href":"https://github.com/forkcms/forkcms/pull/971"},"issue":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/971"},"comments":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/971/comments"},"review_comments":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/971/comments"},"review_comment":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/971/commits"},"statuses":{"href":"https://api.github.com/repos/forkcms/forkcms/statuses/a78061b413ab6775ea19ba5ab726c8157a65e802"}}}}