public class UserUtils extends Object
Constructor and Description |
---|
UserUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isValidEmail(String email)
Deprecated.
use
EmailAddressValidator . Since 4.4.0. |
static User |
populateNames(User user)
Ensures that the first name, last name and displayName of
the user object is fully populated.
|
@Deprecated public static boolean isValidEmail(String email)
EmailAddressValidator
. Since 4.4.0.email
- potential email address.public static User populateNames(User user)
Examples:
Original data | Populated data |
---|---|
("jsmith", "John", "Smith", "John Smith") | ("jsmith", "John", "Smith", "John Smith") |
("jsmith", "", "", "John Smith") | ("jsmith", "John", "Smith", "John Smith") |
("jsmith", "John", "Smith", "") | ("jsmith", "John", "Smith", "John Smith") |
("jsmith", "", "", "") | ("jsmith", "", "jsmith", "jsmith") |
("jsmith", null, null, null) | ("jsmith", "", "jsmith", "jsmith") |
For more complicated cases, see the documentation for the other methods in this class.
user
- potentially partially populated user. The username
of the user cannot be blank.getDisplayName(String, String, String, String)
,
getFirstName(String, String)
,
getLastName(String, String)
Copyright © 2024 Atlassian. All rights reserved.