aboutsummaryrefslogtreecommitdiff
path: root/js/classes/ElggUser.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/classes/ElggUser.js')
-rw-r--r--js/classes/ElggUser.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/classes/ElggUser.js b/js/classes/ElggUser.js
new file mode 100644
index 000000000..b8a976fba
--- /dev/null
+++ b/js/classes/ElggUser.js
@@ -0,0 +1,28 @@
+/**
+ * Create a new ElggUser
+ *
+ * @param {Object} o
+ * @extends ElggEntity
+ * @class Represents an ElggUser
+ * @property {string} name
+ * @property {string} username
+ * @property {string} language
+ * @property {boolean} admin
+ */
+elgg.ElggUser = function(o) {
+ elgg.ElggEntity.call(this, o);
+};
+
+elgg.inherit(elgg.ElggUser, elgg.ElggEntity);
+
+/**
+ * Is this user an admin?
+ *
+ * @warning The admin state of the user should be checked on the server for any
+ * actions taken that require admin privileges.
+ *
+ * @return {boolean}
+ */
+elgg.ElggUser.prototype.isAdmin = function() {
+ return this.admin;
+}; \ No newline at end of file