projects/apttus/ecommerce/src/lib/modules/crm/services/user.service.ts
AObjectService
Properties |
Methods |
| getBrowserLocale | ||||||||||
getBrowserLocale(underscore: boolean)
|
||||||||||
|
Retrieves the browser locale for the current user
Parameters :
Returns :
any
|
| getCurrentUser |
getCurrentUser()
|
|
Returns :
Observable<User>
|
| getCurrentUserLocale | ||||||||||
getCurrentUserLocale(underscore: boolean)
|
||||||||||
|
Retrieves the current user locale to support salesforce and other environment
Parameters :
Returns :
Observable<string>
it return replaced string for current user locale |
| initializeGuestUser |
initializeGuestUser()
|
|
Method is used to create a guest user record prior to registration. Will set the defaults on the record to browser defaults.
Returns :
Observable<User>
a user record containing the browser defaults (will not be committed to db). |
| isGuest |
isGuest()
|
|
Used for determining if the current user is a guest user.
Returns :
Observable<boolean>
a boolean observable. Will be true if the user is a guest user. |
| isLoggedIn |
isLoggedIn()
|
|
Method is used to determine if the user has authenticated and an access token exists.
Returns :
Observable<boolean>
a boolean observable |
| login | ||||||||||||
login(username: string, password: string)
|
||||||||||||
|
Primary method for authenticating community users. Uses the SOAP Api to retrieve a session id and associate it with any future calls.
Parameters :
Returns :
Observable<void>
|
| loginOauth |
loginOauth()
|
|
Method will trigger the oauth process for a connected app. NOTE: You must implement the redirect / callback process and set the returned access token on the force service manually using this.forceService.setAccessToken(...);
Returns :
void
|
| logout |
logout()
|
|
Primary logout method.
Returns :
Observable<void>
a void observable when the process has completed. |
| me |
me()
|
|
Primary method for retrieving the current user record
Returns :
Observable<User>
an observable of type User |
| register | ||||||||
register(user: User)
|
||||||||
|
Primary method for registering a given user record. Set any defaults on the user record passed in as the first argument. Will associate an account and a profile with the user record based on the community settings.
Parameters :
Returns :
Observable<User>
|
| sendPasswordResetEmail | ||||||||
sendPasswordResetEmail(username: string)
|
||||||||
|
Method will trigger a password reset for the given username
Parameters :
Returns :
Observable<any>
|
| setAlias | ||||||||
setAlias(user: User)
|
||||||||
|
Method generates an alias for the current record based on the first name and last name.
Parameters :
Returns :
void
|
| setCurrency | |||||||||||||||
setCurrency(currencyIsoCode: string, commit: boolean)
|
|||||||||||||||
|
Method sets the currency for the current user
Parameters :
Returns :
Observable<User>
|
| setLocale | |||||||||||||||
setLocale(locale: string, commit: boolean)
|
|||||||||||||||
|
Method sets the locale for the current user.
Parameters :
Returns :
Observable<void>
an observable of type User |
| setPassword | ||||||||
setPassword(newPassword: string)
|
||||||||
|
Method is used to set a password for the current user.
Parameters :
Returns :
Observable<User>
|
| setTimezone | ||||||||
setTimezone(user: User)
|
||||||||
|
Method sets the timezonesidkey for a given user record
Parameters :
Returns :
void
|
| setUserDefaults | ||||||
setUserDefaults(user: User)
|
||||||
|
Parameters :
Returns :
void
|
| updateCurrentUser | ||||||
updateCurrentUser(user: User)
|
||||||
|
Parameters :
Returns :
Observable<User>
|
| Protected CACHE_KEY |
Type : string
|
Default value : 'User'
|
| type |
Default value : User
|