IUsers

class IUsers

Bases: ImpactCOMWrapperBase, Iterable

Description:

A collection of IUser objects.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property count

Gets Count.

Description:

The number of items in this collection.

Returns:

The value of Count.

Return type:

count (int)

add(login_i_d, full_name, password, email, site, user_group)
Description:

Adds a user to the database.

Remarks:

This method has been deprecated, please use Add2 or add_domain instead. When the using Add or Add2 or add_domain methods, users are created in the database, but the IUsers collection is not automatically updated. You can call IUsers.refresh to reload the collection. Introduced in Impact 5.1.4.23.

Parameters:
  • login_id (str) – Specifies the login_id of the user to add. This parameter must not be null or empty and must not be the login_id of an existing user.

  • full_name (str) – Specifies the full name of the user to add. This parameter must not be null or empty and must not be the full_name of an existing user.

  • password (str) – Specifies the password of the user to add. This parameter can be null or empty.

  • email (str) – Specifies the email address of the user to add. This parameter can be null or empty.

  • site (ISite) – Specifies the site of the user to add. This parameter can be null.

  • user_group (IMasterSetting) – Specifies the user group of the user to add. This parameter cannot be null.

add2(login_i_d, full_name, password, email, user_type, site, user_group, publish_to_enterprise)
Description:

Adds a user to the database.

Remarks:

When the using Add or Add2 or add_domain methods, users are created in the database, but the IUsers collection is not automatically updated. You can call IUsers.refresh to reload the collection. Introduced in Impact 8.0.0.75.

Parameters:
  • login_id (str) – Specifies the login_id of the user to add. This parameter must not be null or empty and must not be the login_id of an existing user.

  • full_name (str) – Specifies the full name of the user to add. This parameter must not be null or empty and must not be the full_name of an existing user.

  • password (str) – Specifies the password of the user to add. This parameter can be null or empty.

  • email (str) – Specifies the email address of the user to add. This parameter can be null or empty.

  • user_type (ipUserType) – Specifies the user type of the user to add.

  • site (ISite) – Specifies the site of the user to add. This parameter can be null.

  • user_group (IMasterSetting) – Specifies the user group of the user to add. This parameter cannot be null.

  • publish_to_enterprise (bool) – Determines if the new user will be published via the Impact Enterprise Services when configured.

add_domain(login_i_d, user_type, l_d_a_p_update, site, user_group, publish_to_enterprise)
Description:

Adds a domain (LDAP authenticated) user to the database.

Remarks:

If the database is not configured for LDAP authentication then this method will fail. When the using Add or Add2 or add_domain methods, users are created in the database, but the IUsers collection is not automatically updated. You can call IUsers.refresh to reload the collection. Introduced in Impact 8.0.0.75.

Parameters:
  • login_id (str) – Specifies the login_id of the user to add. This parameter must not be null or empty and must not be the login_id of an existing user. It should be the fully qualified domain name of the user, for example ‘user1@domain.com’. However if a default user domain is configured you can simply pass in the user name, for example ‘user1’.

  • user_type (ipUserType) – Specifies the user type of the user to add.

  • ldap_update (bool) – Specifies whether the new users LDAP user attributes should be updated immediately. Alternatively they can be updated using the IUser.ldap_update method or will be updated automatically each time the user connects.

  • site (ISite) – Specifies the site of the user to add. This parameter can be null.

  • user_group (IMasterSetting) – Specifies the user group of the user to add. This parameter cannot be null.

  • publish_to_enterprise (bool) – Determines if the new user will be published via the Impact Enterprise Services when configured.

Examples:

exclude_user_type(user_type)
Description:

Use to filter the type of users returned by IUsers

Remarks:

By default IUsers includes all user types (both utCAD and utNServer). Now you can change the user types that IUsers returns. Simply set these before using any method that caches useers, or explicitly before calling Refresh. Introduced in Impact 11.0.0.43

Parameters:

user_type (ipUserType) – Type of user

find_by_key(key)
Description:

Gets an IUser with the specified key.

Remarks:

Note that this method will ignore any ‘ipUserType’ filter applied to the IUsers collection. Introduced in Impact 9.0.0.77.

Returns:

The user object.

Parameters:

key (int) – The key to match (IUser.key)

Examples:

find_by_name(string_search_type, full_name)
Description:

Gets an array of IUser objects which match the specified name.

Remarks:

When using sstWildcards, note that these are SQL wildcards (not regular expressions). Note that this method will ignore any ‘ipUserType’ filter applied to the IUsers collection. Introduced in Impact 9.0.0.82.

Returns:

An array of user objects.

Parameters:
  • string_search_type (ipStringSearchType) – The string search type to use when matching users.

  • full_name (str) – The expression to be matched with the user’s name (IUser.full_name). The matching is case-insensitive.

Examples:

get_administrators()
Description:

Gets an array of IUser objects representing all the users in the database that are administrators.

Remarks:

Remember arrays are zero based and collections are one based.

get_connected_primary_users()
Description:

Gets an array of IUser objects representing all the users in the database that are currently connected as primary users.

Remarks:

Remember arrays are zero based and collections are one based. This returns a list of users who are connected from either Impact or nServer.

get_users_for_group(group_name)
Description:

Gets an array IUser objects representing all the users in a specified group.

Remarks:

Remember arrays are zero based and collections are one based.

Parameters:

group_name (str) – Specifies the name of the group to get users for.

include_user_type(user_type)
Description:

Use to filter the type of users returned by IUsers

Parameters:

user_type (ipUserType) – Type of user

item(index)
Description:

Gets an IUser with the specified name or index.

Remarks:

This method matches the user’s login name (IUser.login_id), not their personal name - see IUsers.find_by_name instead.

Parameters:

index (any) – Specifies the name or index of the user to get.

refresh()
Description:

Refresh the IUsers collection from the database.

send_message(text)
Description:

Sends a message to ALL users in the database.

Parameters:

text (str) – Specifies the text of the message to send.

Examples:

send_message_to_users(users, text)
Description:

Sends a message to all the specified users.

Parameters:
  • users (any) – Specifies the users to send a message to.

  • text (str) – Specifies the text of the message to send.

Examples: