You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1- By default it is null ( this.userId = null; in constructor )
2- Before changing the userId value we check if the current userId is null or empty and throw an exception when it is the case.
Got this in decompiled code from nuget PiwikTracker v 2.7
public void setUserId(string userId)
{
if (userId == null)
{
this.setNewVisitorId();
}
else
{
if (string.IsNullOrEmpty(this.userId))
throw new Exception("User ID cannot be empty.");
this.userId = userId;
}
}
I think we shall replace if (string.IsNullOrEmpty(this.userId)) by if (string.IsNullOrEmpty(userId))
Sincerely.
H.T
The text was updated successfully, but these errors were encountered:
Hello, In setUserId function of PiwikTracker:
How can we set the userId if
1- By default it is null ( this.userId = null; in constructor )
2- Before changing the userId value we check if the current userId is null or empty and throw an exception when it is the case.
Got this in decompiled code from nuget PiwikTracker v 2.7
public void setUserId(string userId)
{
if (userId == null)
{
this.setNewVisitorId();
}
else
{
if (string.IsNullOrEmpty(this.userId))
throw new Exception("User ID cannot be empty.");
this.userId = userId;
}
}
I think we shall replace if (string.IsNullOrEmpty(this.userId)) by if (string.IsNullOrEmpty(userId))
Sincerely.
H.T
The text was updated successfully, but these errors were encountered: