?
This document uses PHP Chinese website manual Release
GetUserId() 方法返回指定用戶(hù)的 ID。
WebSecurity.GetUserId(userName)
參數(shù) | 類(lèi)型 | 描述 |
---|---|---|
userName | String | 用戶(hù)名 |
類(lèi)型 | 描述 |
---|---|
Integer | 用戶(hù) ID |
在下面的情況下,任何對(duì) WebSecurity 對(duì)象的訪問(wèn)將拋出一個(gè) InvalidOperationException:
用戶(hù) ID 是存儲(chǔ)在用戶(hù)數(shù)據(jù)庫(kù)中的用戶(hù)信息的主鍵。
它是用于在用戶(hù)資料表和會(huì)員表中識(shí)別用戶(hù)。
名稱(chēng) | 值 |
---|---|
Namespace | WebMatrix.WebData |
Assembly | WebMatrix.WebData.dll |