Converse converse.js

Namespace: user

_converse.api.user

This grouping collects API functions related to the current logged in user.

Source:

Namespaces

presence
presence
settings
settings
status
status

Methods

(static) jid() → {string}

Source:
Returns:

The current user's full JID (Jabber ID)

Type
string
Example
_converse.api.user.jid())

(static) jid() → {string}

Source:
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 auto_login configuration flag to determine whether Converse should try to log the user in if it fails to restore a previous auth'd session.

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 auto_login configuration flag to determine whether Converse should try to log the user in if it fails to restore a previous auth'd session.

Source:
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.

Source:
Example
_converse.api.user.logout();

_converse.api.user

This grouping collects API functions related to the current logged in user.

Source:

Namespaces

presence
presence
settings
settings
status
status

Methods

(static) jid() → {string}

Source:
Returns:

The current user's full JID (Jabber ID)

Type
string
Example
_converse.api.user.jid())

(static) jid() → {string}

Source:
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 auto_login configuration flag to determine whether Converse should try to log the user in if it fails to restore a previous auth'd session.

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 auto_login configuration flag to determine whether Converse should try to log the user in if it fails to restore a previous auth'd session.

Source:
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.

Source:
Example
_converse.api.user.logout();