projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3b394e
)
Empty password is forbidden when creating new user account.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Mon, 13 Apr 2015 17:03:26 +0000
(19:03 +0200)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Wed, 6 May 2015 20:31:07 +0000
(22:31 +0200)
admin/users.php
patch
|
blob
|
history
diff --git
a/admin/users.php
b/admin/users.php
index 135e0068cd013819365b6d81c1447f8ec417ab32..2074bc1945c11c424420cfe8cd91a18b5f40cc1c 100644
(file)
--- a/
admin/users.php
+++ b/
admin/users.php
@@
-23,7
+23,7
@@
include_once($path_to_root . "/admin/db/users_db.inc");
simple_page_mode(true);
//-------------------------------------------------------------------------------------------------
simple_page_mode(true);
//-------------------------------------------------------------------------------------------------
-function can_process()
+function can_process(
$new
)
{
if (strlen($_POST['user_id']) < 4)
{
if (strlen($_POST['user_id']) < 4)
@@
-33,7
+33,7
@@
function can_process()
return false;
}
return false;
}
- if (
$_POST['password'] != "")
+ if (
!$new && ($_POST['password'] != ""))
{
if (strlen($_POST['password']) < 4)
{
{
if (strlen($_POST['password']) < 4)
{
@@
-58,7
+58,7
@@
function can_process()
if (($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') && check_csrf_token())
{
if (($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') && check_csrf_token())
{
- if (can_process())
+ if (can_process(
$Mode == 'ADD_ITEM'
))
{
if ($selected_id != -1)
{
{
if ($selected_id != -1)
{