I found this code in AdvancedSecurity.php
template file that sometimes will cause the issue:
<# if (hasUserId) { #>
$filter = GetUserFilter(Config("USER_ID_FIELD_NAME"), $this->CurrentUserID);
<# } else { #>
$filter = GetUserFilter(Config("LOGIN_USERNAME_FIELD_NAME"), $this->currentUserName());
<# } #>
Oftentimes, User ID field is not unique for each user. The issue is, this will cause unwanted result when we are using CurrentUserInfo("{fieldname}")
global function. It will not point to the correct user from users table.
How to change that code so that we simply always use filter based on current UserName, even we enable also User ID field? That would be better if we only use:
$filter = GetUserFilter(Config("LOGIN_USERNAME_FIELD_NAME"), $this->currentUserName());
Thank you.