(name: string = "")
| 22 | export const UNKNOWN_USER_NAME = `users/${UNKNOWN_ID}`; |
| 23 | |
| 24 | export const unknownUser = (name: string = ""): User => { |
| 25 | const user = create(UserSchema, { |
| 26 | name: UNKNOWN_USER_NAME, |
| 27 | state: State.ACTIVE, |
| 28 | title: i18n.t("common.unknown"), |
| 29 | }); |
| 30 | if (name) { |
| 31 | user.name = name; |
| 32 | const email = extractUserEmail(name); |
| 33 | user.email = email; |
| 34 | user.title = email.split("@")[0]; |
| 35 | } |
| 36 | return user; |
| 37 | }; |
| 38 | |
| 39 | export const ALL_USERS_USER_EMAIL = "allUsers"; |
| 40 | // Pseudo allUsers account. |
no test coverage detected