1 alter procedure DBO. aspnet_membership_getpasswordwithformat
2 @ applicationname nvarchar (256 ),
3 @ username nvarchar (256)
4as
5 begin
6 declare @ password nvarchar (128)
7 declare @ passwordformat int
8. Declare @ passwordsalt nvarchar (128)
9 declare @ islockedout bit
10 declare @ failedpasswordattemptcount int
11 declare @ failedpasswordanswerattemptcount int
12 declare @ isapproved bit
13/** // * declares a large number of variables ,*/
14
15
16 select @ Password = M. Password,
17 @ passwordformat = M. passwordformat,
18 @ passwordsalt = M. passwordsalt,
19 @ islockedout = M. islockedout,
20 @ failedpasswordattemptcount = M. failedpasswordattemptcount,
21 @ failedpasswordanswerattemptcount = M. failedpasswordanswerattemptcount,
22 @ isapproved = M. isapproved
23 from DBO. aspnet_applications A, DBO. aspnet_users U, DBO. aspnet_membership m
24 where lower (@ applicationname) = A. loweredapplicationname and
25 U. applicationid = A. applicationid and
26 U. userid = M. userid and
27 lower (@ username) = u. loweredusername
28/** // * Three-table join. The additional conditions are @ applicationname/@ username */
29
30 if (@ rowcount = 0) -- if the number of affected rows is 0
31 return 1
32
33 If (@ islockedout = 1) -- if the user is locked
34 return 99
35
36 select @ password,
37 @ passwordformat,
38 @ passwordsalt,
39 @ failedpasswordattemptcount,
40 @ failedpasswordanswerattemptcount,
41 @ isapproved
42/** // * query the expected field and return 0 */
43 return 0
44end
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.