»

LJ::want_userid

LJ::want_userid — Returns userid when passed either userid or the user hash. Useful to functions that want to accept either. Forces its return value to be a number (for safety).

Use

LJ::want_userid(userid);

Arguments

  • userid. Either a userid, or a user hash with the userid in its 'userid' key.

Source:

cgi-bin/ljlib.pl

Returns:

The userid, guaranteed to be a numeric value.