added password generator, fixes #346

Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
This commit is contained in:
Christoph Burchert (Chb)
2011-04-16 16:46:38 +02:00
parent d02daee582
commit e87c16b598
15 changed files with 92 additions and 1 deletions

View File

@@ -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',

View File

@@ -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',

View File

@@ -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'],

View File

@@ -54,6 +54,11 @@ return array(
'label' => $lng['login']['password'].'&nbsp;('.$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',

View File

@@ -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(),
)
)
)

View File

@@ -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'],

View File

@@ -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'

View File

@@ -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',

View File

@@ -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',

View File

@@ -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(),
)
)
)

View File

@@ -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',

View File

@@ -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(),
)
)
)
)

View 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);
}
?>

View File

@@ -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';

View File

@@ -1561,3 +1561,4 @@ $lng['emails']['back_to_overview'] = 'Zur&uuml;ck zur &Uuml;bersicht';
$lng['error']['user_banned'] = 'Ihr Benutzerkonto wurde gesperrt. Bitte kontaktieren Sie Ihren Administrator f&uuml;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';