syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: Fix conditional logic
Date Tue, 05 Dec 2017 07:49:47 GMT
Fix conditional logic


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/bf34f2c9
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/bf34f2c9
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/bf34f2c9

Branch: refs/heads/master
Commit: bf34f2c99befa5f0c54ed7dba3298e26131bd364
Parents: 34cb1fa
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Dec 5 08:49:30 2017 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Dec 5 08:49:36 2017 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/syncope/core/logic/UserLogic.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/bf34f2c9/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
index 64ad183..2b0b5cc 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
@@ -475,7 +475,9 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserPatch>
{
     protected UserTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException
{
         String key = null;
 
-        if (!"confirmPasswordReset".equals(method.getName()) && ArrayUtils.isNotEmpty(args))
{
+        if ("requestPasswordReset".equals(method.getName())) {
+            key = userDAO.findKey((String) args[0]);
+        } else if (!"confirmPasswordReset".equals(method.getName()) && ArrayUtils.isNotEmpty(args))
{
             for (int i = 0; key == null && i < args.length; i++) {
                 if (args[i] instanceof String) {
                     key = (String) args[i];
@@ -487,8 +489,6 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserPatch>
{
                     key = ((StatusPatch) args[i]).getKey();
                 }
             }
-        } else if ("requestPasswordReset".equals(method.getName())) {
-            key = userDAO.findKey((String) args[0]);
         }
 
         if (key != null) {


Mime
View raw message