diff options
Diffstat (limited to 'modules/comment/controllers/comments.php')
-rw-r--r-- | modules/comment/controllers/comments.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php index 82b12893..84d6ca47 100644 --- a/modules/comment/controllers/comments.php +++ b/modules/comment/controllers/comments.php @@ -65,7 +65,7 @@ class Comments_Controller extends REST_Controller { $form = comment::get_add_form($item); $valid = $form->validate(); if ($valid) { - if (user::active()->guest && !$form->add_comment->inputs["name"]->value) { + if (Identity::active()->guest && !$form->add_comment->inputs["name"]->value) { $form->add_comment->inputs["name"]->add_error("missing", 1); $valid = false; } @@ -78,13 +78,13 @@ class Comments_Controller extends REST_Controller { if ($valid) { $comment = comment::create( - $item, user::active(), + $item, Identity::active(), $form->add_comment->text->value, $form->add_comment->inputs["name"]->value, $form->add_comment->email->value, $form->add_comment->url->value); - $active = user::active(); + $active = Identity::active(); if ($active->guest) { $form->add_comment->inputs["name"]->value(""); $form->add_comment->email->value(""); @@ -192,7 +192,7 @@ class Comments_Controller extends REST_Controller { * @see REST_Controller::form_edit($resource) */ public function _form_edit($comment) { - if (!user::active()->admin) { + if (!Identity::active()->admin) { access::forbidden(); } print comment::get_edit_form($comment); |