function flag_get_sid in Flag 7.3
Same name and namespace in other branches
- 6.2 flag.module \flag_get_sid()
- 7.2 flag.module \flag_get_sid()
Get the Session ID for a user. Utilizes the Session API module.
Gets the Session ID for an anonymous user. It will always return 0 for registered users.
Parameters
int $uid: (optional) The user ID to return the session ID for. Defaults to the current user.
bool $create: (optional) Determines whether a session should be created if it doesn't exist yet. Defaults to FALSE.
Return value
The session ID, if the session exists. If not, the return value is 0.
See also
9 calls to flag_get_sid()
- flag_flag::access in includes/
flag/ flag_flag.inc - Determines whether the user may flag, or unflag, the given entity.
- flag_flag::flag in includes/
flag/ flag_flag.inc - Flags, or unflags, an item.
- flag_flag::get_flagging_record in includes/
flag/ flag_flag.inc - Returns the flagging record.
- flag_flag::get_user_count in includes/
flag/ flag_flag.inc - Returns the number of items a user has flagged.
- flag_get_user_flags in ./
flag.module - Find what a user has flagged, either a single entity or on the entire site.
File
- ./
flag.module, line 2487 - The Flag module.
Code
function flag_get_sid($uid = NULL, $create = FALSE) {
return flag_set_sid($uid, $create);
}