04-14-2023, 10:13 PM
First of all I want to tel that I`m not good at English so here may be some mistakes..
so I added password generator. How? here will be some notes:
Version: 0.29.13
in file <code>/var/www/vhosts/ehcp/config/dbutil.php</code>
about line #3466 find <code>case 'password':</code>
replace that with:
<code>
case 'password':
$res.="\n<td>
<script>
var keylist='abcdefghijklmnopqrstuvwxyz123456789'
var temp=''
function generatepass(){
temp=''
for (i=0;i<8;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
return temp
}
function populateform$alanadi$alantipi(enterlength){
$('#$alanadi').val(generatepass(enterlength));
$('#$alanadi$alantipi').val(generatepass(enterlength));
}
</script>
<form name=\"pgenerate\">
<input id='$alanadi' type='$alantipi' name=$alanadi value='$varsayilan'>
<input type=\"button\" value=\"Generate Password\" onClick=\"populateform$alanadi$alantipi()\">
<input id='$alanadi$alantipi'><br />
</form>
";
$res.="</td>\n";
break;
</code>
if You want to add special symbols add them in linde
<code>
var keylist='abcdefghijklmnopqrstuvwxyz123456789'
</code>
password length is set with number <strong>8</strong>. edit line
And this is it
it works form me
<code>for (i=0;i<8;i++)</code>
Restored from old drupal forum, for user uid:3412 username:lamzaks
You may reset your password to access your new account here.
so I added password generator. How? here will be some notes:
Version: 0.29.13
in file <code>/var/www/vhosts/ehcp/config/dbutil.php</code>
about line #3466 find <code>case 'password':</code>
replace that with:
<code>
case 'password':
$res.="\n<td>
<script>
var keylist='abcdefghijklmnopqrstuvwxyz123456789'
var temp=''
function generatepass(){
temp=''
for (i=0;i<8;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
return temp
}
function populateform$alanadi$alantipi(enterlength){
$('#$alanadi').val(generatepass(enterlength));
$('#$alanadi$alantipi').val(generatepass(enterlength));
}
</script>
<form name=\"pgenerate\">
<input id='$alanadi' type='$alantipi' name=$alanadi value='$varsayilan'>
<input type=\"button\" value=\"Generate Password\" onClick=\"populateform$alanadi$alantipi()\">
<input id='$alanadi$alantipi'><br />
</form>
";
$res.="</td>\n";
break;
</code>
if You want to add special symbols add them in linde
<code>
var keylist='abcdefghijklmnopqrstuvwxyz123456789'
</code>
password length is set with number <strong>8</strong>. edit line
And this is it
it works form me
<code>for (i=0;i<8;i++)</code>
Restored from old drupal forum, for user uid:3412 username:lamzaks
You may reset your password to access your new account here.