Logged In Username Incorrect
K2 blackpearl 4.7
K2 smartforms 4.7BASED ON
K2 blackpearl 4.7TAGS
K2 Object Browser
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
IssueK2 SmartForms is returning the incorrect username when using the K2 Context Logged in Username to populate a data label with.
SymptomsUser details incorrectly returned, this however only returns an incorrect username for some of the users and not all users.
This resolution was a combination of two solutions:
- The expression used to trim down logged in users system name was altered to use a replace instead of trimming it from the sides Example: Replace(SystemUserName, TextToReplace, [EmptyString]).
- A new feature that was shipped for 4.7 had to be activated.
- This feature changes the way K2 query's results from AD and did resolved the majority of the issue.
- From the [HostServer].[SecurityLabel] Table in SQL the RoleInt was altered and the "TranslateWithDirectoryServices=False;" had been added to activate the feature as it is deactivated by default.
- Something changed on AD - perhaps an AD migration was done or some users details had changed, or even AD specific permissions for the K2 service account had been changed.
This feature was shipped with 4.7 and will not work in any K2 versions pre 4.7