Revision 63:a4f26bbaa655

View differences:

src/main/java/my/com/upass/MinimalUPassControllerV2.java
379 379
		final String userAlias = user.getUserAlias();
380 380

  
381 381
		int rc;
382
		tryCatch: try {
382
		try {
383 383
			AccessCheckResult checkResult = checkAppAccess(appAccessId, hashedSecretKey, txSession);
384 384

  
385 385
			final Integer invokingAppId = checkResult.invokerAppId;
......
401 401

  
402 402
			} else {
403 403
				boolean granted = appAccessMgtService.grantAppAccessToUser(
404
						profile.getMinUser().getUserID(), appIdForProfile, UserAppAccess.TYPE_USER, txSession);
404
						user.getUserID(), appIdForProfile, UserAppAccess.TYPE_USER, txSession);
405 405

  
406 406
				rc = granted ?
407 407
						modifyUserService.updateProfileShallowly(profile, txSession)
src/main/java/my/com/upass/services/CreateUserService.java
167 167
	}
168 168

  
169 169
	public ReturnBundle addUser(
170
			MinimalUserBean user, Session txSession, boolean userPassword) {
170
			MinimalUserBean user, Session txSession,
171
			boolean userPassword) {
171 172

  
172
		return addUser(
173
				user.getUserAlias(), user.getUserType(), user.getDescription(),
174
				user.getHashedPassword(), user.getPstate(), txSession, userPassword);
173
		ReturnBundle ret = addUser(user.getUserAlias(), user.getUserType(),
174
				user.getDescription(), user.getHashedPassword(),
175
				user.getPstate(), txSession, userPassword);
176

  
177
		if (ret.userId != null)
178
			user.setUserID(ret.userId.longValue());
179
		
180
		return ret;
175 181
	}
176 182
}

Also available in: Unified diff