Update Login class with error count and report

If a user login fails and the user exists count the error and date of
last error.
If the user is set strict and the error login count is bigger than 10,
lock the user. User can only be unlocked from admin user.
Add new view only form table array type that is not saved, but only
viewed as is from the database value.
Add strict/lock yes/no into the edit user form.
Update edit user table with login error count, login error date, strict
and locked rows.
This commit is contained in:
Clemens Schwaighofer
2014-08-22 13:44:05 +09:00
parent 9bae54af71
commit 96224d0d1e
7 changed files with 188 additions and 75 deletions

View File

@@ -25,7 +25,8 @@
* "fk" => 1/0 - sets the foreign key (do not use at the moment ... buggy ;)
* "mandatory" => 1/0 - triggers * in output, but nor error check
* "output_name" => "text" - text put as label for the element
* "type" => "text/textarea/date/drop_down_db/drop_down_array/drop_down_db_input/drop_down_db_same_db/radio_array/binary/hidden/file/password"
* "type" => "view/text/textarea/date/drop_down_db/drop_down_array/drop_down_db_input/drop_down_db_same_db/radio_array/binary/hidden/file/password"
* View is special, it just prints out the data as is, will not be saved
* 1) more will come
* 2) keep in mind that binary will not be checked, as it is always set to a value (default is "no")
* ---- the next four fields are only NECESSARY (!!!) for drop_down_db_input
@@ -44,6 +45,7 @@
* "error_check" => "custom/email/date/number/unique" - 1) more will come
* "error_regex" => "regex" - if error_check is custom regex here
* "error_example" => "text" - example input text for error_check (only custom right now)
* "empty" => "value/text" - ONLY for view. If no data found, set this value
* --- file:
* "save_dir" => "directory where it should be saved to
* "accept_type" => "mime types accepted (mime/text,mime/jpeg ... etc)"
@@ -689,6 +691,11 @@
$output_name .= ' *';
// create right side depending on "definiton" in table_array
$type = $this->table_array[$element_name]["type"];
// view only output
if ($this->table_array[$element_name]["type"] == "view")
{
$data['value'] = !$this->table_array[$element_name]["value"] ? $this->table_array[$element_name]['empty'] : $this->table_array[$element_name]["value"];
}
// binary true/false element
if ($this->table_array[$element_name]["type"] == "binary")
{