Changeset:
04544967c996
https://sourceforge.net/p/mrbs/hg-code/ci/04544967c996d7df162845384ae9913925cc4362
Author:
Campbell Morrison <[email protected]>
Date:
Tue Feb 21 20:10:06 2017 +0000
Log message:
Moved printLoginForm() out
diffstat:
web/auth/auth_wordpress.inc | 10 +++++++++
web/session/session_wordpress.inc | 43 ---------------------------------------
2 files changed, 10 insertions(+), 43 deletions(-)
diffs (73 lines):
diff -r e153efb13096 -r 04544967c996 web/auth/auth_wordpress.inc
--- a/web/auth/auth_wordpress.inc Tue Feb 21 17:16:20 2017 +0000
+++ b/web/auth/auth_wordpress.inc Tue Feb 21 20:10:06 2017 +0000
@@ -20,6 +20,16 @@
}
+// This function is just here so that MRBS knows that WordPress has the
+// capability of validating eithere a username or an email address. It doesn't
+// do anything because wp_authenticate() in authValidateUser() does all the
+// work and copes with both types of input.
+function authValidateEmail()
+{
+ trigger_error("I was not expecting to be called!", E_USER_WARNING);
+}
+
+
/* authGetUserLevel($user)
*
* Determines the user's access level
diff -r e153efb13096 -r 04544967c996 web/session/session_wordpress.inc
--- a/web/session/session_wordpress.inc Tue Feb 21 17:16:20 2017 +0000
+++ b/web/session/session_wordpress.inc Tue Feb 21 20:10:06 2017 +0000
@@ -84,49 +84,6 @@
}
-/*
- Display the login form. Used by two routines below.
- Will eventually return to $target_url.
-*/
-function printLoginForm($action, $target_url, $returl)
-{
- // __() and esc_attr__() are WordPress functions
-
- echo '<form class="form_general" id="logon" method="post" action="' .
htmlspecialchars($action) . "\">\n";
- echo "<fieldset>\n";
- echo '<legend>' . get_vocab("please_login") . "</legend>\n";
- echo "<div>\n";
- echo '<label for="NewUserName">' . __('Username or Email') . ":</label>\n";
- echo "<input type=\"text\" id=\"NewUserName\" name=\"NewUserName\">\n";
- echo "</div>\n";
- echo "<div>\n";
- echo '<label for="NewUserPassword">' . __('Password') . ":</label>\n";
- echo "<input type=\"password\" id=\"NewUserPassword\"
name=\"NewUserPassword\">\n";
- echo "</div>\n";
-
- // We need to preserve the original calling page, so that it's there when we
eventually get
- // to the target_url (especially if that's edit_entry.php). If this is the
first time through then $HTTP_REFERER holds
- // the original caller. If this is the second time through we will have
stored it in $returl.
- if (!isset($returl))
- {
- $returl = isset($HTTP_REFERER) ? $HTTP_REFERER : "";
- }
- echo "<input type=\"hidden\" name=\"returl\" value=\"" .
htmlspecialchars($returl) . "\">\n";
-
- echo '<input type="hidden" name="target_url" value="' .
htmlspecialchars($target_url) ."\">\n";
- echo "<input type=\"hidden\" name=\"Action\" value=\"SetName\">\n";
- echo "<div id=\"logon_submit\">\n";
- echo '<input class="submit" type="submit" value="' . esc_attr__('Log In') .
"\">\n";
- echo "</div>\n";
- echo "</fieldset>\n";
- echo "</form>\n";
- echo "</div>\n"; // Close of the contents div
-
- // Print footer and exit
- print_footer(TRUE);
-}
-
-
/* authGet()
*
* Request the user name/password
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits