Commit 6060dbba6d3c4421bd8874489f4eecd4594edd2a

Authored by Conrad Vermeulen
1 parent e4858c63

"KTS-2121"

"ldap plugin not validating username correctly"
Fixed.

Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6821 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
@@ -264,7 +264,7 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider { @@ -264,7 +264,7 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider {
264 $name = KTUtil::arrayGet($_REQUEST, 'name'); 264 $name = KTUtil::arrayGet($_REQUEST, 'name');
265 if (empty($name)) { $this->errorRedirectToMain(_kt('You must specify a name for the user.')); } 265 if (empty($name)) { $this->errorRedirectToMain(_kt('You must specify a name for the user.')); }
266 $username = KTUtil::arrayGet($_REQUEST, 'ldap_username'); 266 $username = KTUtil::arrayGet($_REQUEST, 'ldap_username');
267 - if (empty($name)) { $this->errorRedirectToMain(_kt('You must specify a new username.')); } 267 + if (empty($username)) { $this->errorRedirectToMain(_kt('You must specify a new username.')); }
268 // FIXME check for non-clashing usernames. 268 // FIXME check for non-clashing usernames.
269 269
270 $email_address = KTUtil::arrayGet($_REQUEST, 'email_address'); 270 $email_address = KTUtil::arrayGet($_REQUEST, 'email_address');