UsuarioCorrente

A variável UsuarioCorrente retorna o ID do usuário logado no sistema.

Sintaxe

UsuarioCorrente:Integer;

Exemplo

 procedure Usuario;
 var
  Q:TPHQuery;                             
 begin
   try            
    Q := NewPHQuery;
    Q.Add('SELECT * '+
          'FROM PESSOAS '+
          'WHERE ID = :USU ');  
    Q.ParamByName('USU').AsInteger := UsuarioCorrente;
    Q.Open;  
  finally
    Q.Free;
  end;             
 end;          
 begin
   Usuario;                            
 end.