Code: Select all
<!-- IF ERROR -->
<div class="errorbox"><h3>{L_WARNING}</h3>
<p>{ERROR}</p>
</div>
<!-- ENDIF -->
Code: Select all
<fieldset>
<legend>{L_DEFAULT_PASS}</legend>
<dl>
<span>{L_DEFAULT_PASS_EXPLAIN}</span>
</dl>
<dl>
<dt><label for="default_pass">{L_DEFAULT_PASS}:</label></dt>
<dd>{DEFAULT_PASS}</dd>
</dl>
</fieldset>
Code: Select all
<dl>
<dt><label for="username">{L_USERNAME}: *</label>
<br /><span>{L_USERNAME_EXPLAIN}</span></dt>
<dd><input class="medium" type="text" id="username" name="username" size="25" maxlength="40" value="{NEW_USERNAME}" /></dd>
</dl>
Code: Select all
<dl>
<dt><label for="new_password">{L_NEW_PASSWORD}: *</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="new_password" id="new_password" size="25" maxlength="255" value="{DEFAULT_PASS}" class="inputbox" title="{L_CHANGE_PASSWORD}" /></dd>
</dl>
<dl>
<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}: *</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{DEFAULT_PASS}" class="inputbox" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>
<dl>
Code: Select all
'legend2' => 'WARNINGS',
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
Code: Select all
'legend3' => 'DEFAULT_PASS',
'default_password' => array('lang' => 'DEFAULT_PASS', 'validate' => 'string', 'type' => 'text:30:255', 'explain' => false),
Code: Select all
$data = array(
Code: Select all
$default_pass = $config['default_password'];
Code: Select all
'bday_year' => request_var('bday_year', 0),
Code: Select all
'default_password' => request_var('default_password', $default_pass),
Code: Select all
$new_password = str_split(base64_encode(md5(time() . $data['new_username'])), $config['min_pass_chars'] + rand(3, 5));
Code: Select all
//$new_password = str_split(base64_encode(md5(time() . $data['new_username'])), $config['min_pass_chars'] + rand(3, 5));
Code: Select all
'new_username' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('username')),
Code: Select all
'new_password' => array(
array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
array('password')),
'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
Code: Select all
if ($data['email'] != $data['email_confirm'])
{
$error[] = $user->lang['NEW_EMAIL_ERROR'];
}
Code: Select all
if ($data['new_password'] != $data['password_confirm'])
{
$error[] = $user->lang['NEW_PASSWORD_ERROR'];
}
Code: Select all
'CONTINUE_EDIT_USER' => '%1$sClick here to the manage %2$sâs profile%3$s', // e.g.: Click here to edit Joeâs profile.
Code: Select all
'DEFAULT_PASS' => 'Default Password',
'DEFAULT_PASS_EXPLAIN' => 'Default password is already populated in the password fields.',
'DEFAULT_PASS_CHANGE_EXPLAIN' => 'Password used for the add user page.',
'PASSWORD_EXPLAIN' => 'Create new password if you decide not to use the default password as above.',
No, install this mod, then use my changes after that. If I have time, I'll add setting where you can check a box to enable the random password generator again.DragonMaster1 wrote:Does the old version need to be un-installed and then add this code?
Just a suggestion - this should be corrected in the instructions. I just spent more time than I would have liked figuring out what to do and didn't find the answer until seeing this post.Highway of Life wrote:Users & Groups, then Users... it was a typo.
The Module will be listed in the top drop-down menu on the right.