added password generator, fixes #346
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
This commit is contained in:
@@ -34,6 +34,11 @@ return array(
|
||||
'type' => 'password',
|
||||
'mandatory' => true
|
||||
),
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
'type' => 'select',
|
||||
|
||||
@@ -43,6 +43,12 @@ return array(
|
||||
'type' => 'password',
|
||||
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||
),
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
'type' => 'select',
|
||||
|
||||
@@ -46,7 +46,12 @@ return array(
|
||||
),
|
||||
'new_customer_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password'
|
||||
'type' => 'password',
|
||||
),
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'sendpassword' => array(
|
||||
'label' => $lng['admin']['sendpassword'],
|
||||
|
||||
@@ -54,6 +54,11 @@ return array(
|
||||
'label' => $lng['login']['password'].' ('.$lng['panel']['emptyfornochanges'].')',
|
||||
'type' => 'password'
|
||||
),
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
'type' => 'select',
|
||||
|
||||
@@ -32,6 +32,11 @@ return array(
|
||||
'email_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password'
|
||||
),
|
||||
'email_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -33,6 +33,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password'
|
||||
),
|
||||
'email_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'email_quota' => array(
|
||||
'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false),
|
||||
'label' => $lng['emails']['quota'],
|
||||
|
||||
@@ -39,6 +39,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password'
|
||||
),
|
||||
'directory_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'directory_authname' => array(
|
||||
'label' => $lng['extras']['htpasswdauthname'],
|
||||
'type' => 'text'
|
||||
|
||||
@@ -38,6 +38,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password'
|
||||
),
|
||||
'directory_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'directory_authname' => array(
|
||||
'label' => $lng['extras']['htpasswdauthname'],
|
||||
'type' => 'text',
|
||||
|
||||
@@ -45,6 +45,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
),
|
||||
'ftp_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'sendinfomail' => array(
|
||||
'label' => $lng['customer']['sendinfomail'],
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -39,6 +39,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'desc' => $lng['ftp']['editpassdescription'],
|
||||
'type' => 'password',
|
||||
),
|
||||
'ftp_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -37,6 +37,11 @@ return array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
),
|
||||
'mysql_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'sendinfomail' => array(
|
||||
'label' => $lng['customer']['sendinfomail'],
|
||||
'type' => 'checkbox',
|
||||
|
||||
@@ -43,6 +43,11 @@ return array(
|
||||
'label' => $lng['changepassword']['new_password_ifnotempty'],
|
||||
'type' => 'password',
|
||||
),
|
||||
'mysql_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'value' => generatePassword(),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
28
lib/functions/froxlor/function.generatePassword.php
Normal file
28
lib/functions/froxlor/function.generatePassword.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2011 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generates a random password
|
||||
*/
|
||||
|
||||
function generatePassword()
|
||||
{
|
||||
global $db, $settings;
|
||||
|
||||
return substr(md5(uniqid(microtime(), 1)), 24, 10);
|
||||
}
|
||||
?>
|
||||
@@ -1579,3 +1579,4 @@ $lng['emails']['back_to_overview'] = 'Back to overview';
|
||||
$lng['error']['user_banned'] = 'Your account has been banned. Please contact your administrator for further information.';
|
||||
$lng['serversettings']['validate_domain'] = 'Validate domain names';
|
||||
$lng['login']['combination_not_found'] = 'Combination of user and email adress not found.';
|
||||
$lng['customer']['generated_pwd'] = 'Password suggestion';
|
||||
|
||||
@@ -1561,3 +1561,4 @@ $lng['emails']['back_to_overview'] = 'Zurück zur Übersicht';
|
||||
$lng['error']['user_banned'] = 'Ihr Benutzerkonto wurde gesperrt. Bitte kontaktieren Sie Ihren Administrator für weitere Informationen.';
|
||||
$lng['serversettings']['validate_domain'] = 'Validiere Domainnamen';
|
||||
$lng['login']['combination_not_found'] = 'Kombination von Benutzer und E-Mail Adresse nicht gefunden.';
|
||||
$lng['customer']['generated_pwd'] = 'Passwortvorschlag';
|
||||
|
||||
Reference in New Issue
Block a user