Import user feature in OpenOLAT

17 views
Skip to first unread message

Jeff Underwood

unread,
Mar 12, 2015, 2:20:34 PM3/12/15
to open...@googlegroups.com
Greetings,
 
I'm trying to use the import user feature in OpenOLAT. I am encountering difficulties with some usernames I am importing. Mostly, the usernames seem to meet OpenOLAT rules for username and password. However, I have users like the following that don't. I get the following error:
 
EXAMPLE (the email address is fictitious):
jeff underwood  34m32687dl3xjljv en jeff underwood  jeffun...@email.com none 629 jeffun...@email.com
 
I receive this error:
 
Error in line 1: the user name "jeff underwood" does not follow OLAT conventions. Please change that user name.
 
For the sake of testing I took the space out of the "jeff underwood". Of course the import proceeded without issue
 
I do understand it is the space in the username is causing the error. However, If I take out the space the user will not be able to login using the LDAP login. I tried double/single quotes around the username allow the import to proceed but that did not work.
 
Question: can I change the rules for the username to allow the import of those users with usernames similar to the one above? Or is there something I need to enclose the username in to allow it to proceed?
 
Thank you for your time.
 
regards,
Jeff Underwood

Florian Gnägi

unread,
Mar 12, 2015, 6:32:59 PM3/12/15
to open...@googlegroups.com
Hi Jeff

In file
/src/main/java/org/olat/user/_spring/userContext.xml
(or in class if you have it already compiled)

replace Line 281: 

<bean id="org.olat.user.UserNameAndPasswordSyntaxChecker" class="org.olat.user.UserNameAndPasswordSyntaxCheckerWithEmail" />

with something like this:

<bean id="org.olat.user.UserNameAndPasswordSyntaxChecker" class="org.olat.user.UserNameAndPasswordSyntaxCheckerWithRegexp“>
<property name=„passwordRegExp" value="YOURFAVORITE-REGULAR-EXPRESSION"/>
<property name=„usernameRegExp" value="YOURFAVORITE-REGULAR-EXPRESSION"/>
</bean>

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

----------------------------------------------------------
professional services for the e-learning system OpenOLAT
 hosting - operating - support - development - consulting
----------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
----------------------------------------------------------




Jeff Underwood

unread,
Mar 13, 2015, 2:31:54 PM3/13/15
to open...@googlegroups.com
Florian,

Thank you for the information. This will be very helpful.

regards,
Jeff
Reply all
Reply to author
Forward
0 new messages