Atozed Forums

Full Version: accessing user name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Users are demanding that the user name entered during log in be used for intraweb app. They say i should use LDAP so they do not have to reenter user name and password. Do i use WebApplication.Request.mAuthUser?
Code:
function GetUsername: string;
var
  NetUserName: PChar;
  Size: DWORD;
begin
  Result := '';
  Size := 50;
  NetUserName := StrAlloc(Size);
  try
    if GetUserNamew(NetUserName, Size) then
      Result := NetUserName;
  finally
    StrDispose(NetUserName);
  end;
end;
Do you mean something like this?
(05-20-2020, 02:17 PM)newuser Wrote: [ -> ]
Code:
function GetUsername: string;
var
  NetUserName: PChar;
  Size: DWORD;
begin
  Result := '';
  Size := 50;
  NetUserName := StrAlloc(Size);
  try
    if GetUserNamew(NetUserName, Size) then
      Result := NetUserName;
  finally
    StrDispose(NetUserName);
  end;
end;
Do you mean something like this?

yes, thanks