Variety of changes to the way we do user editing:

1) Allow admins to edit the admin bit of other admins
2) Don't allow admins to delete themselves (partial fix for ticket #213)
3) Inline user::update().  Don't do form processing in helper methods!
4) Inline user::_get_edit_form() so that we can treat edit forms differently.
   Trying to hard to make common functions makes for weird edge cases.
This commit is contained in:
Bharat Mediratta
2009-05-13 03:56:50 +00:00
parent b9aeec634d
commit 9c24b5d94d
4 changed files with 69 additions and 47 deletions
+2 -2
View File
@@ -21,10 +21,10 @@ class User_Model extends ORM {
protected $has_and_belongs_to_many = array("groups");
var $rules = array(
"name" => "required|length[1,32]",
"name" => "length[1,32]",
"full_name" => "length[0,255]",
"email" => "valid_email|length[1,255]",
"password" => "required|length[1,40]",
"password" => "length[1,40]",
"locale" => "length[2,10]");
public function __set($column, $value) {