Fix some indenting in account.php.
This commit is contained in:
committed by
Jeremy Newman
parent
1e797f9364
commit
3b09de0902
84
account.php
84
account.php
@@ -23,36 +23,35 @@ function do_account($cmd = null)
|
||||
if (! $cmd) return 0;
|
||||
switch($cmd)
|
||||
{
|
||||
case "new":
|
||||
apidb_header("New Account");
|
||||
include(BASE."include/"."form_new.php");
|
||||
apidb_footer();
|
||||
exit;
|
||||
|
||||
case "new":
|
||||
apidb_header("New Account");
|
||||
include(BASE."include/"."form_new.php");
|
||||
apidb_footer();
|
||||
exit;
|
||||
case "do_new":
|
||||
cmd_do_new();
|
||||
exit;
|
||||
|
||||
case "do_new":
|
||||
cmd_do_new();
|
||||
exit;
|
||||
case "login":
|
||||
apidb_header("Login");
|
||||
include(BASE."include/"."form_login.php");
|
||||
apidb_footer();
|
||||
exit;
|
||||
|
||||
case "login":
|
||||
apidb_header("Login");
|
||||
include(BASE."include/"."form_login.php");
|
||||
apidb_footer();
|
||||
exit;
|
||||
case "do_login":
|
||||
cmd_do_login();
|
||||
exit;
|
||||
|
||||
case "do_login":
|
||||
cmd_do_login();
|
||||
exit;
|
||||
case "send_passwd":
|
||||
cmd_send_passwd();
|
||||
exit;
|
||||
|
||||
case "send_passwd":
|
||||
cmd_send_passwd();
|
||||
exit;
|
||||
|
||||
case "logout":
|
||||
apidb_session_destroy();
|
||||
addmsg("You are successfully logged out.", "green");
|
||||
redirect(apidb_fullurl("index.php"));
|
||||
exit;
|
||||
case "logout":
|
||||
apidb_session_destroy();
|
||||
addmsg("You are successfully logged out.", "green");
|
||||
redirect(apidb_fullurl("index.php"));
|
||||
exit;
|
||||
}
|
||||
//not valid command, display error page
|
||||
errorpage("Internal Error","This module was called with incorrect parameters");
|
||||
@@ -124,7 +123,7 @@ function cmd_do_new()
|
||||
redirect(apidb_fullurl());
|
||||
}
|
||||
else
|
||||
retry("new", "Failed to create account: $result");
|
||||
retry("new", "Failed to create account: $result");
|
||||
}
|
||||
|
||||
//email lost password
|
||||
@@ -139,29 +138,28 @@ function cmd_send_passwd()
|
||||
|
||||
if ($userid)
|
||||
{
|
||||
if ($user->update($userid, $passwd))
|
||||
{
|
||||
|
||||
if ($user->update($userid, $passwd))
|
||||
{
|
||||
$msg = "Application DB Lost Password\n";
|
||||
$msg .= "----------------------------\n";
|
||||
$msg .= "We have received a request that you lost your password.\n";
|
||||
$msg .= "We will create a new password for you. You can then change\n";
|
||||
$msg .= "your password at the Preferences screen.\n\n";
|
||||
$msg .= "Your new password is: ".$passwd."\n\n";
|
||||
|
||||
if (mail($user->lookup_email($userid), '[AppDB] Lost Password', $msg))
|
||||
{
|
||||
addmsg("Your new password has been emailed to you.", "green");
|
||||
}
|
||||
else
|
||||
{
|
||||
addmsg("Your password has changed, but we could not email it to you. Contact Support!", "red");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
addmsg("Internal Error, we could not update your password.", "red");
|
||||
}
|
||||
|
||||
if (mail($user->lookup_email($userid), '[AppDB] Lost Password', $msg))
|
||||
{
|
||||
addmsg("Your new password has been emailed to you.", "green");
|
||||
}
|
||||
else
|
||||
{
|
||||
addmsg("Your password has changed, but we could not email it to you. Contact Support!", "red");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
addmsg("Internal Error, we could not update your password.", "red");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user