diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 19:18:43 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 19:18:43 +0000 |
commit | 421129d7a8287e1666b41d35b811659cc3bbb4fe (patch) | |
tree | baf9be527009409b6585537a20c4744a9d5dcd35 /modules | |
parent | 2a49c743000b63a8770db7c8602d326e0cc436bc (diff) |
Resolve Trac Ticket #32
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/controllers/comments.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php index d04ba60c..b4d7d24a 100644 --- a/modules/comment/controllers/comments.php +++ b/modules/comment/controllers/comments.php @@ -80,10 +80,18 @@ class Comments_Controller extends REST_Controller { $form->add_comment->email->value, $form->add_comment->url->value); - $form->add_comment->inputs["name"]->value(""); + $active = user::active(); + if ($active->guest) { + $form->add_comment->inputs["name"]->value(""); + $form->add_comment->email->value(""); + $form->add_comment->url->value(""); + } else { + $form->add_comment->inputs["name"]->value($active->full_name); + $form->add_comment->email->value($active->email); + $form->add_comment->url->value($active->url); + } + $form->add_comment->text->value(""); - $form->add_comment->email->value(""); - $form->add_comment->url->value(""); print json_encode( array("result" => "success", "resource" => ($comment->state == "published" |