add lost_password_function
| | |
| | | 'maxlength' => '2', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'lost_password_function' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'regex' => '', |
| | | 'errmsg' => '', |
| | | 'default' => 1, |
| | | 'value' => array(0 => 0, 1 => 1), |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ) |
| | | //################################# |
| | | // ENDE Datenbankfelder |
| | |
| | | $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; |
| | | $wb['username_error_collision'] = 'Der Benutzername darf nicht <b>web<b> oder <b>web<b> gefolgt von einer Zahl sein.'; |
| | | $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; |
| | | $wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung'; |
| | | ?> |
| | |
| | | $wb['password_match_txt'] = 'The passwords do match.'; |
| | | $wb['username_error_collision'] = 'The username may not be web or web plus a number."'; |
| | | $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; |
| | | $wb['lost_password_function_txt'] = 'Forgot password function is available'; |
| | | ?> |
| | |
| | | {tmpl_var name='language'} |
| | | </select> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='lost_password_function_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='lost_password_function'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | $wb['back_txt'] = 'Zurück'; |
| | | $wb['stay_logged_in_txt'] = 'Dauerhaft eingeloggt bleiben'; |
| | | $wb['email_error'] = 'Email contains unallowed characters or has a invalid format.'; |
| | | $wb['lost_password_function_disabled_txt'] = 'Die Passwort vergessen Funktion steht für diesen Benutzer nicht zur Verfügung.'; |
| | | ?> |
| | |
| | | $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.'; |
| | | $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.'; |
| | | $wb['stay_logged_in_txt'] = 'Keep me logged in'; |
| | | $wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.'; |
| | | ?> |
| | |
| | | $username = $app->db->quote($_POST['username']); |
| | | $email = $app->db->quote($_POST['email']); |
| | | |
| | | $client = $app->db->queryOneRecord("SELECT * FROM client WHERE username = '$username' AND email = '$email'"); |
| | | $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = '$username' AND client.email = '$email' AND client.client_id = sys_user.client_id"); |
| | | |
| | | if($client['lost_password_function'] == 0) { |
| | | $app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']); |
| | | } else { |
| | | if($client['client_id'] > 0) { |
| | | $new_password = $app->auth->get_random_password(); |
| | | $new_password_encrypted = $app->auth->crypt_password($new_password); |
| | |
| | | } else { |
| | | $app->tpl->setVar("error", $wb['pw_error']); |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | $app->tpl->setVar("msg", $wb['pw_error_noinput']); |
| | | } |