User Attributes

17 views
Skip to first unread message

Ryan

unread,
Aug 4, 2014, 4:49:17 AM8/4/14
to open...@googlegroups.com
Hi,

Is there a way to change the requirements for the user attributes? Such as allowing the user name to have capital letters. Or making the last name not mandatory?

Thanks in Advance

Ryan

unread,
Aug 4, 2014, 7:58:30 AM8/4/14
to open...@googlegroups.com
One other question.. is there a way to require a password change on first login?

Florian Gnägi

unread,
Aug 4, 2014, 11:06:41 AM8/4/14
to open...@googlegroups.com
Hi

Have a look at src/main/java/org/olat/user/propertyhandlers/_spring/userPropertiesContext.xml to make something mandatory or not, 
and change the appropriate handler to something else (e.g. your own) in userPropertriesHandlersContext.xml in the same package. 

Note that the Generic127CharTextPropertyHandler does already have a regexp property, so you can just modify the existing last name handler and add the regexp there

Something like this should work (not tested)

<bean id="userPropertyLastName" class="org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler">
<property name="name" value="lastName" />
<property name="group" value="account" />
<property name="deletable" value="false" />

<!—- Only uppercase last names allowed —>
<property name=“regExp" value=“[A-Z]*" />
<property name=“regExpMsgKey" value=my.great.error.message.when.wrong.last.name" />
</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 and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

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

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















Florian Gnägi

unread,
Aug 4, 2014, 11:09:04 AM8/4/14
to open...@googlegroups.com

You can add a controller to the org.olat.user.AfterLoginConfig bean. E.g. have a look at userContext.xml and uncomment the ChangePasswordController. 

Cheers
Florian


Am 04.08.2014 um 13:58 schrieb Ryan <rashenf...@gmail.com>:

One other question.. is there a way to require a password change on first login?

Reply all
Reply to author
Forward
0 new messages