projects
/
e-DoKo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BUGFIX: solo statistics didn't include silent solo
[e-DoKo.git]
/
include
/
preferences.php
diff --git
a/include/preferences.php
b/include/preferences.php
index 8a6050d0f70106831ca4502728d4e282c569a71d..613d96543371e37d0084b935ddc5a1026c756394 100644
(file)
--- a/
include/preferences.php
+++ b/
include/preferences.php
@@
-18,7
+18,6
@@
$changed_cards = 0;
$changed_timezone = 0;
$changed_autosetup = 0;
$changed_timezone = 0;
$changed_autosetup = 0;
-output_status();
display_user_menu();
/* get old infos */
display_user_menu();
/* get old infos */
@@
-104,10
+103,14
@@
if(myisset("password0") && $_REQUEST["password0"]!="" )
if(!( ($password == $oldpasswd) || DB_check_recovery_passwords($oldpasswd,$email) ))
$changed_password = -1;
if(!( ($password == $oldpasswd) || DB_check_recovery_passwords($oldpasswd,$email) ))
$changed_password = -1;
- /* check if new password
s are types the same twice
*/
+ /* check if new password
has been typed in correctly
*/
if($_REQUEST["password1"] != $_REQUEST["password2"] )
$changed_password = -2;
if($_REQUEST["password1"] != $_REQUEST["password2"] )
$changed_password = -2;
+ /* check if new password is long enough */
+ if(strlen($_REQUEST["password1"])<4)
+ $changed_password = -3;
+
if($changed_password==1)
{
DB_query("UPDATE User SET password='".md5($_REQUEST["password1"]).
if($changed_password==1)
{
DB_query("UPDATE User SET password='".md5($_REQUEST["password1"]).
@@
-183,6
+186,9
@@
echo " <tr><td>Password(old): </td><td>",
"<input type=\"password\" id=\"password0\" name=\"password0\" size=\"20\" maxlength=\"30\" />";
switch($changed_password)
{
"<input type=\"password\" id=\"password0\" name=\"password0\" size=\"20\" maxlength=\"30\" />";
switch($changed_password)
{
+ case '-3':
+ echo "The new passwords is not long enough (you need at least 4 characters).";
+ break;
case '-2':
echo "The new passwords don't match.";
break;
case '-2':
echo "The new passwords don't match.";
break;
@@
-206,8
+212,5
@@
echo " </table>\n";
echo " </form>\n";
echo "</div>\n";
echo " </form>\n";
echo "</div>\n";
-output_footer();
-DB_close();
-exit();
-
+return;
?>
\ No newline at end of file
?>
\ No newline at end of file