From 75833b0cd994dd4512c22ec3647d93260a56244c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=BCller?= Date: Mon, 16 May 2005 22:29:01 +0000 Subject: [PATCH] RFE #1197482, password generator on user creation. RFC: ok like that? TODO: add strings. --- ChangeLog | 4 ++++ libraries/server_privileges.js | 43 ++++++++++++++++++++++++++++++++++ server_privileges.php | 14 +++++++++++ 3 files changed, 61 insertions(+) diff --git a/ChangeLog b/ChangeLog index ef4066c58..6ddf05d2d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-05-17 Olivier Mueller + * server_privileges.php, libraries/server_privileges.js: RFE #1197482, + password generator on user creation. RFC: ok like that? TODO: add strings. + 2005-05-15 Marc Delisle * sql.php, libraries/sqlparser.lib.php: bug #1120434, comment at the end of query is applied to appended LIMIT as well diff --git a/libraries/server_privileges.js b/libraries/server_privileges.js index 3ccf6780b..a1e0910ce 100644 --- a/libraries/server_privileges.js +++ b/libraries/server_privileges.js @@ -86,3 +86,46 @@ function setCheckboxes(the_form, the_checkboxes, do_check) return true; } // end of the 'setCheckboxes()' function + + + + + +/** + * Generate a new password, which may then be copied to the form + * with suggestPasswordCopy(). + * + * @param string the form name + * + * @return boolean always true + */ +function suggestPassword(the_form) +{ + var pwchars = "abcdefhjmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWYXZ.,:"; + var passwordlength = 16; // do we want that to be dynamic? no, keep it simple :) + var passwd = ''; + + for (i=0;i' . "\n" . $spaces . ' ' . "\n" . $spaces . ' ' . "\n" + . $spaces . '' . "\n" + . $spaces . '' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . '  ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" + . $spaces . ' ' . "\n" . $spaces . '' . "\n"; } // end of the 'PMA_displayUserAndHostFields()' function