ElggUser.js 602 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Create a new ElggUser
  3. *
  4. * @param {Object} o
  5. * @extends ElggEntity
  6. * @class Represents an ElggUser
  7. * @property {string} name
  8. * @property {string} username
  9. * @property {string} language
  10. * @property {boolean} admin
  11. */
  12. elgg.ElggUser = function(o) {
  13. elgg.ElggEntity.call(this, o);
  14. };
  15. elgg.inherit(elgg.ElggUser, elgg.ElggEntity);
  16. /**
  17. * Is this user an admin?
  18. *
  19. * @warning The admin state of the user should be checked on the server for any
  20. * actions taken that require admin privileges.
  21. *
  22. * @return {boolean}
  23. */
  24. elgg.ElggUser.prototype.isAdmin = function() {
  25. return this.admin;
  26. };