1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 18:32:44 +02:00

Password options for logon, email login option, random user name/PW generation, Bugtracker #4393 and possibly others previously added to 0.7

This commit is contained in:
e107steved
2008-06-13 20:20:23 +00:00
parent 51637af101
commit b5771e501d
28 changed files with 2336 additions and 558 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu.php,v $
| $Revision: 1.9 $
| $Date: 2008-03-13 19:15:56 $
| $Author: lisa_ $
| $Revision: 1.10 $
| $Date: 2008-06-13 20:20:22 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -24,7 +24,7 @@ if(defined("FPW_ACTIVE"))
return; // prevent failed login attempts when fpw.php is loaded before this menu.
}
global $eMenuActive, $e107, $tp, $use_imagecode, $ADMIN_DIRECTORY, $LOGIN_MENU_MESSAGE, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR,
global $eMenuActive, $pref, $e107, $tp, $use_imagecode, $ADMIN_DIRECTORY, $LOGIN_MENU_MESSAGE, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR,
$login_menu_shortcodes, $LOGIN_MENU_FORM, $LOGIN_MENU_LOGGED, $LOGIN_MENU_STATS, $LOGIN_MENU_EXTERNAL_LINK;
$ip = $e107->getip();
@@ -167,8 +167,12 @@ else
require(e_PLUGIN."login_menu/login_menu_template.php");
}
$text = '<form method="post" action="'.e_SELF.(e_QUERY ? '?'.e_QUERY : '').'">';
$text .= $tp->parseTemplate($LOGIN_MENU_FORM, true, $login_menu_shortcodes);
$text = '<form method="post" action="'.e_SELF.(e_QUERY ? '?'.e_QUERY : '');
if (varsettrue($pref['password_CHAP'],0))
{
$text .= '" onsubmit="hashLoginPassword(this)';
}
$text .= '">'.$tp->parseTemplate($LOGIN_MENU_FORM, true, $login_menu_shortcodes);
$text .= '</form>';
if (file_exists(THEME.'images/login_menu.png')) {

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu_shortcodes.php,v $
| $Revision: 1.5 $
| $Date: 2008-02-06 00:23:28 $
| $Author: secretr $
| $Revision: 1.6 $
| $Date: 2008-06-13 20:20:22 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -21,11 +21,15 @@ global $tp;
$login_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
/*
SC_BEGIN LM_USERNAME_INPUT
return "<input class='tbox login user' type='text' name='username' id='username' size='15' value='' maxlength='30' />\n";
global $pref;
return "<input class='tbox login user' type='text' name='username' id='username' size='15' value='' maxlength='".varset($pref['loginname_maxlength'],30)."' />\n";
SC_END
SC_BEGIN LM_PASSWORD_INPUT
return "<input class='tbox login pass' type='password' name='userpass' id='userpass' size='15' value='' maxlength='20' />\n\n";
global $pref;
$t_password = "<input class='tbox login pass' type='password' name='userpass' id='userpass' size='15' value='' maxlength='30' />\n";
if (!USER && isset($_SESSION['challenge']) && varset($pref['password_CHAP'],0)) $t_password .= "<input type='hidden' name='hashchallenge' id='hashchallenge' value='{$_SESSION['challenge']}' />\n\n";
return $t_password;
SC_END
SC_BEGIN LM_IMAGECODE
@@ -100,7 +104,7 @@ if ($pref['user_reg'])
if(isset($pref['user_reg_veri']) && $pref['user_reg_veri'] == 1){
if (!$pref['auth_method'] || $pref['auth_method'] == 'e107' )
{
return $parm == 'href' ? e_SIGNUP.'?resend' : "<a class='login_menu_link resend' id=login_menu_link_resend' href='".e_SIGNUP."?resend' title=\"".LOGIN_MENU_L40."\">".LOGIN_MENU_L40."</a>";
return $parm == 'href' ? e_SIGNUP.'?resend' : "<a class='login_menu_link resend' id='login_menu_link_resend' href='".e_SIGNUP."?resend' title=\"".LOGIN_MENU_L40."\">".LOGIN_MENU_L40."</a>";
}
}
}

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu_template.php,v $
| $Revision: 1.4 $
| $Date: 2008-02-06 00:23:28 $
| $Author: secretr $
| $Revision: 1.5 $
| $Date: 2008-06-13 20:20:22 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -56,9 +56,22 @@ if (!isset($LOGIN_MENU_FORM)){
$sc_style['LM_IMAGECODE_BOX']['pre'] = "";
$sc_style['LM_IMAGECODE_BOX']['post'] = "<br />";
$LOGIN_MENU_FORM = "
{LM_MESSAGE}
<div style='text-align: center'>
$LOGIN_MENU_FORM = "{LM_MESSAGE}";
if ((varset($pref['password_CHAP'],0) == 2) && ($pref['user_tracking'] == "session"))
{
$LOGIN_MENU_FORM .= "
<div style='text-align: center' id='nologinmenuchap'>"."Javascript must be enabled in your browser if you wish to log into this site"."
</div>
<div style='text-align: center; display:none' id='loginmenuchap'>";
}
else
{
$LOGIN_MENU_FORM .= "
<div style='text-align: center'>";
}
$LOGIN_MENU_FORM .= "
".LOGIN_MENU_L1."<br />
{LM_USERNAME_INPUT}<br />
".LOGIN_MENU_L2."<br />