fix getting password from registration form
This commit is contained in:
parent
10fb809271
commit
18b71b1086
3
ldap.go
3
ldap.go
@ -9,6 +9,9 @@ import (
|
||||
)
|
||||
|
||||
func createLDAPAccount(uname string, pwd string, email string) error {
|
||||
if uname == "" || pwd == "" || email == "" {
|
||||
return errors.New("Missing field")
|
||||
}
|
||||
url := Conf.Ldap.Url
|
||||
newdn := fmt.Sprintf("%v=%v,%v,%v", Conf.Ldap.UserAttr, uname, Conf.Ldap.UserOu, Conf.Ldap.LdapDc)
|
||||
binddn := fmt.Sprintf("%v,%v", Conf.Ldap.AdminUser, Conf.Ldap.LdapDc)
|
||||
|
@ -13,11 +13,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" id="psw" name="psw" pattern="(?=.*\d)(?=.*[a-z]).{8,}" title="Must contain at least one number and at least 8 or more characters" required></td>
|
||||
<td><input type="password" id="password" name="password" pattern="(?=.*\d)(?=.*[a-z]).{8,}" title="Must contain at least one number and at least 8 or more characters" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Confirm Password:</td>
|
||||
<td><input type="password" name="confirm_password" id="confirm_psw" onchange="check()"/></td>
|
||||
<td><input type="password" name="confirm_password" id="confirm_password" onchange="check()"/></td>
|
||||
<td><span id='message'></span></td>
|
||||
<tr>
|
||||
<td>Secret:</td>
|
||||
@ -39,8 +39,8 @@
|
||||
</div>
|
||||
<script>
|
||||
function check() {
|
||||
if(document.getElementById('psw').value ===
|
||||
document.getElementById('confirm_psw').value) {
|
||||
if(document.getElementById('password').value ===
|
||||
document.getElementById('confirm_password').value) {
|
||||
document.getElementById('message').innerHTML = "Passwords match";
|
||||
} else {
|
||||
document.getElementById('message').innerHTML = "Passwords don't match";
|
||||
|
Loading…
Reference in New Issue
Block a user