Global user menu component.
- Source:
Methods
(static) .init()
Initialise the menu.
This will attempt to derive the current user state from markup. This can
then later be refreshed if needed.
- Source:
Example
UCASDesignFramework.userMenu.init()
(static) .updateUserMenu(userInfo)
Perform an update on the user menu.
Updates the global user object and refreshes the menu itself accordingly.
Parameters:
Name | Type | Description |
---|---|---|
userInfo |
object | User object containing the following properties. They are all strings. - UID: The users user identifier if they are logged in, otherwise false, this is the main way of determining login status. - firstName: The users specified first name name if they are logged in, otherwise null. - userType: One of, student, provider, adviser. Used for personalising the menu. - avatar: A remote URL to the users avatar image. - ucasComUrl: Target ucascom system domain, used for rewriting link destinations. - digitalUrl: Target digitalUrl system domain, used for rewriting link destinations. - accountsUrl: Target accountsUrl system domain, used for rewriting link destinations. |
- Source:
Example
UCASDesignFramework.userMenu.updateUserMenu()