Big set of changes to comments, with related changes to akismet and

user modules.

* Don't delete vars when we delete a module.  This makes
  reinstalling a module a lot easier.

* Add user::lookup() as the preferred way to load a user, so that
  other modules don't delve into the user module (that'd be a
  problem when we swap out user modules)

* Notify site admins if Akismet is not fully configured

* Bundle all server variables into the comment so that if/when we
  re-check the comment, we are not using the server info from the
  site admin's request.

* Update Akismet to grab request context data from the comment

* Pre-seed comment fields if we have a logged in user.  Update
  comment::create() API to clarify it for this.

* Delete comment::update(), that's a controller function.

* Add url to User_Model

* Add author_name() author_email() and author_url() to
  Comment_Model.  It'll return the appropriate values depending
  on whether the comment was left by a logged in user or a guest.

* Use resetForm() instead of clearForm() when we reload the
  comment form after ajax submit, this way we preserve the
  pre-seeded values.

* In the user profile page, ignore blank passwords.
This commit is contained in:
Bharat Mediratta
2009-01-10 00:34:23 +00:00
parent 48e73e9081
commit a7feeb576f
16 changed files with 224 additions and 146 deletions

View File

@@ -29,9 +29,13 @@ class Users_Controller extends REST_Controller {
$form->edit_user->password->rules("-required");
if ($form->validate()) {
// @todo: allow the user to change their name
// @todo: handle password changing gracefully
$user->full_name = $form->edit_user->full_name->value;
$user->password = $form->edit_user->password->value;
if ($form->edit_user->password->value) {
$user->password = $form->edit_user->password->value;
}
$user->email = $form->edit_user->email->value;
$user->url = $form->edit_user->url->value;
$user->save();
print json_encode(