Преглед изворни кода

only show reset password link when auth_internal is enabled (refs #681)

Andrew Dolgov пре 11 година
родитељ
комит
3921f5081b
2 измењених фајлова са 6 додато и 0 уклоњено
  1. 2 0
      config.php-dist
  2. 4 0
      include/login_form.php

+ 2 - 0
config.php-dist

@@ -192,6 +192,8 @@
 	// authentication plugin here (auth_*).
 	// Users may enable other user plugins from Preferences/Plugins but may not
 	// disable plugins specified in this list.
+	// Disabling auth_internal in this list would automatically disable
+	// reset password link on the login form.
 	
 	define('LOG_DESTINATION', 'sql');
 	// Log destination to use. Possible values: sql (uses internal logging

+ 4 - 0
include/login_form.php

@@ -188,6 +188,8 @@ function bwLimitChange(elem) {
 				value="<?php echo $_SESSION["fake_login"] ?>" />
 		</div>
 
+		<?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?>
+
 		<div class="row">
 			<label><?php echo __("Password:") ?></label>
 			<input type="password" name="password" required="1"
@@ -197,6 +199,8 @@ function bwLimitChange(elem) {
 			<a class='forgotpass' href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a>
 		</div>
 
+		<?php } ?>
+
 		<div class="row">
 			<label><?php echo __("Language:") ?></label>
 			<?php