aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLUserAccountData.cs
diff options
context:
space:
mode:
authorMelanie2010-11-25 20:34:55 +0100
committerMelanie2010-11-25 20:34:55 +0100
commitee9aca9c5270e22407c3aa4aa96c76ca92f90bb9 (patch)
treebae269d89f90c22159946c494048293d1c6a9aa8 /OpenSim/Data/MySQL/MySQLUserAccountData.cs
parentExport the module interface for restart (diff)
downloadopensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.zip
opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.gz
opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.bz2
opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.xz
Add the ability for gods to impersonate users. For this, bit 6 needs to be
set in the target's UserFlags and the impersonator must have UserLevel 200 or above. The user can then log in using the target's name and their own password.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserAccountData.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
index aa69d68..3b35222 100644
--- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL
80 80
81 return DoQuery(cmd); 81 return DoQuery(cmd);
82 } 82 }
83
84 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
85 {
86 MySqlCommand cmd = new MySqlCommand();
87
88 if (scopeID != UUID.Zero)
89 {
90 where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")";
91 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
92 }
93
94 cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm);
95
96 return DoQuery(cmd);
97 }
83 } 98 }
84} 99}