- Posts: 53
- Thank you received: 5
Ask the community, share ideas, and connect with other LimeSurvey users!
Because AuthLdap is a plugin, you can easily:bdeprez wrote: …
I know this is suboptimal since I will need to update my code each time I update Limesurvey but it does the trick and prevents irked users.
If anybody has any ideas how to fix this in a better way, I'm open to suggestions!
…
protected function setUsername($username) { $username = strtolower(str_replace(' ', '', $username)); $this->_username = $username; $event = $this->getEvent(); $identity = $this->getEvent()->get('identity'); $identity->username = $username; $event->set('identity', $identity); return $this; }
I can not guarantee the functionnality but yes, but you're right on one point : it's a protected function, then can not use this one.bdeprez wrote: How would that work then? AuthLDAP does extend "AuthPluginBase.php" but I'm not sure how to proceed...
.
$new_user = strtolower(str_replace(' ', '', $new_user));
$username = strtolower(str_replace(' ', '', $this->getUsername()));