This grouping collects API functions related to the current logged in user.
- Source:
Namespaces
Methods
(static) jid() → {string}
- Source:
Returns:
The current user's full JID (Jabber ID)
- Type
- string
Example
_converse.api.user.jid())
(static) jid() → {string}
Returns:
The current user's full JID (Jabber ID)
- Type
- string
Example
_converse.api.user.jid())
(static) login(jidopt, passwordopt, automaticopt) → {Promise.<void>}
Logs the user in.
If called without any parameters, Converse will try
to log the user in by calling the prebind_url
or credentials_url
depending
on whether prebinding is used or not.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
jid |
string |
<optional> |
||
password |
string |
<optional> |
||
automatic |
boolean |
<optional> |
false | An internally used flag that indicates whether
this method was called automatically once the connection has been
initialized. It's used together with the |
- Source:
Returns:
- Type
- Promise.<void>
(static) login(jidopt, passwordopt, automaticopt) → {Promise.<void>}
Logs the user in.
If called without any parameters, Converse will try
to log the user in by calling the prebind_url
or credentials_url
depending
on whether prebinding is used or not.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
jid |
string |
<optional> |
||
password |
string |
<optional> |
||
automatic |
boolean |
<optional> |
false | An internally used flag that indicates whether
this method was called automatically once the connection has been
initialized. It's used together with the |
Returns:
- Type
- Promise.<void>
(static) logout()
Logs the user out of the current XMPP session.
- Source:
Example
_converse.api.user.logout();
(static) logout()
Logs the user out of the current XMPP session.
Example
_converse.api.user.logout();