projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
041dcda
)
Encode password with new users' login
author
Joey Schulze
<joey@infodrom.org>
Mon, 8 Mar 2010 08:01:43 +0000
(09:01 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Mon, 8 Mar 2010 08:01:43 +0000
(09:01 +0100)
ajax/ajax.php
patch
|
blob
|
history
diff --git
a/ajax/ajax.php
b/ajax/ajax.php
index
6597a76
..
213160a
100644
(file)
--- a/
ajax/ajax.php
+++ b/
ajax/ajax.php
@@
-108,7
+108,9
@@
function save($mask)
$update[] = sprintf("%s=%s", $field, format_decimal($_POST[$field]));
} elseif ($info['type'] == 'passwd') {
if (!empty($_POST[$field]))
$update[] = sprintf("%s=%s", $field, format_decimal($_POST[$field]));
} elseif ($info['type'] == 'passwd') {
if (!empty($_POST[$field]))
- $update[] = sprintf("%s='%s'", $field, pg_escape_string(passwd($_SESSION['sys']['login'],$_POST[$field])));
+ $update[] = sprintf("%s='%s'", $field,
+ pg_escape_string(passwd(empty($_POST['login'])?$_SESSION['sys']['login']:$_POST['login'],
+ $_POST[$field])));
} else {
if (empty($_POST[$field]) && $info['null'] === true)
$update[] = sprintf("%s=NULL", $field);
} else {
if (empty($_POST[$field]) && $info['null'] === true)
$update[] = sprintf("%s=NULL", $field);