Created
June 9, 2014 00:43
-
-
Save viniciusgati/e5177a2ed634d7582b95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "protheus.ch" | |
Class Mil_AccessControl | |
Method New() Constructor | |
Method ExclusiveAccess() | |
Method LoggedInUsers() | |
EndClass | |
Method New() Class Mil_AccessControl | |
Return Self | |
Method ExclusiveAccess() Class Mil_AccessControl | |
Return Len( self:LoggedInUsers() ) == 1 | |
Method LoggedInUsers() Class Mil_AccessControl | |
Local aLgUsers := GetUserInfoArray() | |
Local nIdx := 1 | |
Local aUsers := {} | |
For nIdx := 1 to Len(aLgUsers) | |
AADD( aUsers, aLgUsers[nIdx][1] ) | |
Next | |
Return aUsers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment