From dbebcadbc14737ccd151e3225b0a2deede14b5ff Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 15 Mar 2011 04:40:37 +0000 Subject: Refs #2538: Added documentation to most of the JS methods missing it. git-svn-id: http://code.elgg.org/elgg/trunk@8717 36083f99-b078-4883-b0ff-0f9b5a30f544 --- js/lib/session.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'js/lib/session.js') diff --git a/js/lib/session.js b/js/lib/session.js index a1454aa50..fa3d60aa9 100644 --- a/js/lib/session.js +++ b/js/lib/session.js @@ -1,5 +1,5 @@ /** - * @todo comment + * Provides session methods. */ elgg.provide('elgg.session'); @@ -8,6 +8,7 @@ elgg.provide('elgg.session'); * @param {string} name * @param {string} value * @param {Object} options + * * {number|Date} options[expires] * {string} options[path] * {string} options[domain] @@ -81,6 +82,8 @@ elgg.session.cookie = function (name, value, options) { }; /** + * Returns the object of the user logged in. + * * @return {ElggUser} The logged in user */ elgg.get_logged_in_user_entity = function() { @@ -88,6 +91,8 @@ elgg.get_logged_in_user_entity = function() { }; /** + * Returns the GUID of the logged in user or 0. + * * @return {number} The GUID of the logged in user */ elgg.get_logged_in_user_guid = function() { @@ -96,6 +101,8 @@ elgg.get_logged_in_user_guid = function() { }; /** + * Returns if a user is logged in. + * * @return {boolean} Whether there is a user logged in */ elgg.is_logged_in = function() { @@ -103,6 +110,8 @@ elgg.is_logged_in = function() { }; /** + * Returns if the currently logged in user is an admin. + * * @return {boolean} Whether there is an admin logged in */ elgg.is_admin_logged_in = function() { -- cgit v1.2.3