Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
3cefa2f1
Commit
3cefa2f1
authored
10 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1468: only log error if the property to set is unknown ( or disabled )
parent
b8149944
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/user/UserImpl.java
+10
-1
10 additions, 1 deletion
src/main/java/org/olat/user/UserImpl.java
with
10 additions
and
1 deletion
src/main/java/org/olat/user/UserImpl.java
+
10
−
1
View file @
3cefa2f1
...
@@ -33,6 +33,8 @@ import org.olat.core.commons.persistence.PersistentObject;
...
@@ -33,6 +33,8 @@ import org.olat.core.commons.persistence.PersistentObject;
import
org.olat.core.id.Preferences
;
import
org.olat.core.id.Preferences
;
import
org.olat.core.id.User
;
import
org.olat.core.id.User
;
import
org.olat.core.id.UserConstants
;
import
org.olat.core.id.UserConstants
;
import
org.olat.core.logging.OLog
;
import
org.olat.core.logging.Tracing
;
import
org.olat.user.propertyhandlers.UserPropertyHandler
;
import
org.olat.user.propertyhandlers.UserPropertyHandler
;
/**
/**
...
@@ -55,6 +57,7 @@ import org.olat.user.propertyhandlers.UserPropertyHandler;
...
@@ -55,6 +57,7 @@ import org.olat.user.propertyhandlers.UserPropertyHandler;
public
class
UserImpl
extends
PersistentObject
implements
User
{
public
class
UserImpl
extends
PersistentObject
implements
User
{
private
static
final
long
serialVersionUID
=
-
2872102058369727753L
;
private
static
final
long
serialVersionUID
=
-
2872102058369727753L
;
private
static
final
OLog
log
=
Tracing
.
createLoggerFor
(
UserImpl
.
class
);
private
Preferences
preferences
;
private
Preferences
preferences
;
...
@@ -158,6 +161,7 @@ public class UserImpl extends PersistentObject implements User {
...
@@ -158,6 +161,7 @@ public class UserImpl extends PersistentObject implements User {
/**
/**
* @see org.olat.core.id.User#getProperty(java.lang.String, java.util.Locale)
* @see org.olat.core.id.User#getProperty(java.lang.String, java.util.Locale)
*/
*/
@Override
public
String
getProperty
(
String
propertyName
,
Locale
locale
)
{
public
String
getProperty
(
String
propertyName
,
Locale
locale
)
{
UserManager
um
=
UserManager
.
getInstance
();
UserManager
um
=
UserManager
.
getInstance
();
UserPropertyHandler
propertyHandler
=
um
.
getUserPropertiesConfig
().
getPropertyHandler
(
propertyName
);
UserPropertyHandler
propertyHandler
=
um
.
getUserPropertiesConfig
().
getPropertyHandler
(
propertyName
);
...
@@ -169,10 +173,15 @@ public class UserImpl extends PersistentObject implements User {
...
@@ -169,10 +173,15 @@ public class UserImpl extends PersistentObject implements User {
/**
/**
* @see org.olat.core.id.User#setProperty(java.lang.String, java.lang.String)
* @see org.olat.core.id.User#setProperty(java.lang.String, java.lang.String)
*/
*/
@Override
public
void
setProperty
(
String
propertyName
,
String
propertyValue
)
{
public
void
setProperty
(
String
propertyName
,
String
propertyValue
)
{
UserManager
um
=
UserManager
.
getInstance
();
UserManager
um
=
UserManager
.
getInstance
();
UserPropertyHandler
propertyHandler
=
um
.
getUserPropertiesConfig
().
getPropertyHandler
(
propertyName
);
UserPropertyHandler
propertyHandler
=
um
.
getUserPropertiesConfig
().
getPropertyHandler
(
propertyName
);
propertyHandler
.
setUserProperty
(
this
,
propertyValue
);
if
(
propertyHandler
==
null
)
{
log
.
error
(
"Try to set unkown property: "
+
propertyName
+
" for user: "
+
getKey
());
}
else
{
propertyHandler
.
setUserProperty
(
this
,
propertyValue
);
}
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment