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