diff options
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLPresenceData.cs')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLPresenceData.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLPresenceData.cs b/OpenSim/Data/PGSQL/PGSQLPresenceData.cs index 0376585..51154af 100644 --- a/OpenSim/Data/PGSQL/PGSQLPresenceData.cs +++ b/OpenSim/Data/PGSQL/PGSQLPresenceData.cs | |||
@@ -60,6 +60,16 @@ namespace OpenSim.Data.PGSQL | |||
60 | return ret[0]; | 60 | return ret[0]; |
61 | } | 61 | } |
62 | 62 | ||
63 | public PresenceData GetByUser(UUID userID) | ||
64 | { | ||
65 | PresenceData[] ret = Get("UserID", userID.ToString()); | ||
66 | |||
67 | if (ret.Length == 0) | ||
68 | return null; | ||
69 | |||
70 | return ret[0]; | ||
71 | } | ||
72 | |||
63 | public void LogoutRegionAgents(UUID regionID) | 73 | public void LogoutRegionAgents(UUID regionID) |
64 | { | 74 | { |
65 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) | 75 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) |
@@ -80,7 +90,7 @@ namespace OpenSim.Data.PGSQL | |||
80 | PresenceData[] pd = Get("SessionID", sessionID.ToString()); | 90 | PresenceData[] pd = Get("SessionID", sessionID.ToString()); |
81 | if (pd.Length == 0) | 91 | if (pd.Length == 0) |
82 | return false; | 92 | return false; |
83 | 93 | ||
84 | if (regionID == UUID.Zero) | 94 | if (regionID == UUID.Zero) |
85 | return false; | 95 | return false; |
86 | 96 | ||
@@ -103,7 +113,7 @@ namespace OpenSim.Data.PGSQL | |||
103 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) | 113 | public bool VerifyAgent(UUID agentId, UUID secureSessionID) |
104 | { | 114 | { |
105 | PresenceData[] ret = Get("SecureSessionID", secureSessionID.ToString()); | 115 | PresenceData[] ret = Get("SecureSessionID", secureSessionID.ToString()); |
106 | 116 | ||
107 | if (ret.Length == 0) | 117 | if (ret.Length == 0) |
108 | return false; | 118 | return false; |
109 | 119 | ||