GitHub PullRequestReviewCommentEvent at 2014-02-09 17:32:34
Repository: endofcodes
Actor: dionyziz
Payload: {"comment":{"url":"https://api.github.com/repos/dionyziz/endofcodes/pulls/comments/9569656","id":9569656,"diff_hunk":"@@ -186,6 +190,47 @@ public function renewSessionId() {\n             $this->save();\n         }\n \n+        public function createForgotPasswordLink() {\n+            $value = md5( 32 );\n+            $value = base64_encode( $value );\n+            $this->forgotPasswordToken = $value;\n+            $this->forgotPasswordExpTime = date(\"Y-m-d h:i:s\");\n+            $this->save();\n+            $email = $this->email;\n+            $username = $this->username;\n+            $link = \"localhost/endofcodes/index.php?resource=forgotpasswordrequest&method=view&username=$username&token=$value\";\n+            $mailVars = array(\n+                'username' => $username,\n+                'link' => $link\n+            );\n+            $this->mailFromExternalView( $email, \"views/forgotpasswordmail.php\", 'Password Reset', $mailVars );\n+            return $link;\n+        }\n+        \n+        public function mailFromExternalView( $email, $extView, $subject = '', $vars = array() ) {\n+            if ( !file_exists( $extView ) ) {\n+                return false;","path":"models/user.php","position":68,"original_position":68,"commit_id":"51bc93a764f8fb14fe4228783b4945c22468c885","original_commit_id":"51bc93a764f8fb14fe4228783b4945c22468c885","user":{"login":"dionyziz","id":544572,"avatar_url":"https://gravatar.com/avatar/3863e7fc8ee24a35326b0a813572bd00?d=https%3A%2F%2Fidenticons.github.com%2Fe509947ead55c8d5a5edc93b7efadbe8.png&r=x","gravatar_id":"3863e7fc8ee24a35326b0a813572bd00","url":"https://api.github.com/users/dionyziz","html_url":"https://github.com/dionyziz","followers_url":"https://api.github.com/users/dionyziz/followers","following_url":"https://api.github.com/users/dionyziz/following{/other_user}","gists_url":"https://api.github.com/users/dionyziz/gists{/gist_id}","starred_url":"https://api.github.com/users/dionyziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dionyziz/subscriptions","organizations_url":"https://api.github.com/users/dionyziz/orgs","repos_url":"https://api.github.com/users/dionyziz/repos","events_url":"https://api.github.com/users/dionyziz/events{/privacy}","received_events_url":"https://api.github.com/users/dionyziz/received_events","type":"User","site_admin":false},"body":"Use `throw` on errors; don't return.","created_at":"2014-02-09T17:32:34Z","updated_at":"2014-02-09T17:32:34Z","html_url":"https://github.com/dionyziz/endofcodes/pull/46#discussion_r9569656","pull_request_url":"https://api.github.com/repos/dionyziz/endofcodes/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/dionyziz/endofcodes/pulls/comments/9569656"},"html":{"href":"https://github.com/dionyziz/endofcodes/pull/46#discussion_r9569656"},"pull_request":{"href":"https://api.github.com/repos/dionyziz/endofcodes/pulls/46"}}}}