[MAGNOLIA-4016] Created method getUserById(Object) in UserManager Created: 08/Mar/12  Updated: 12/Mar/12  Resolved: 12/Mar/12

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.5.1

Type: Improvement Priority: Neutral
Reporter: Milan Divilek Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLPUR-64 Replace MgnlUser.getUuid() to MgnlUse... Closed
is causing MGNLGROOVY-55 Add unimplemented method to GroovyBas... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Create method getUserById(Object) to UserManager which return user by his jcr:id and also provide implementation of this method in MgnlUserManager.



 Comments   
Comment by Magnolia International [ 08/Mar/12 ]

Why use anything else than a String as an ID ?
(+ don't return null and ignore the issue when something else is pass, it's bound to explode with an unpredictable NPE later on)

Comment by Milan Divilek [ 09/Mar/12 ]

I use Object because different user managers can use different type of id. Null is returned because we use DelegateUserManager where we iterate over all user manager until return value not null.

Comment by Jan Haderka [ 09/Mar/12 ]

On a second thought ...

  • change the signature to getUserById(String)
  • add getIdentifier():String method to i.m.cms.security.User interface
  • rename i.m.cms.security.MgnlUser.getUuid() to i.m.cms.security.MgnlUser.getIdentifier()
Generated at Mon Feb 12 03:51:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.