SESS getUserIdFromSession

提供: GeeklogJpWiki

lib-session.php>SESS_getUserIdFromSession

目次

説明

 int SESS_getUserIdFromSession (string $sessid, string $cookietime, string $remote_ip, [int $md5_based = 0]) 

Gets the user id from Session ID セッションIDからユーザーIDを取得

Returns the userID associated with the given session, based on the given session lifespan $cookietime and the given remote IP address. If no match found, returns 0.

所与のセッションに含まれるユーザーIDを返す。所与のセッションの有効時間 $cookietime と リモートIPアドレスにもとづて取出しが行われる。マッチングしない場合0を返す。

パラメータ

$sessid
Session ID to get user ID from
$cookietime
Used to query DB for valid sessions
$remote_ip
Used to pull session we need
$md5_based
Let's us now if we need to take MD5 hash into consideration

返り値

return: User ID

参考

使用例

個人用ツール