Atozed Forums
accessing user name - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: accessing user name (/thread-1680.html)



accessing user name - tobenschain - 05-20-2020

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?


RE: accessing user name - newuser - 05-20-2020

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?


RE: accessing user name - tobenschain - 05-21-2020

(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