Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare function auth:login($login as xs:string, $pass as xs:string) as xs:string
- {
- let $user := /buers/buyer[login=$login]
- return
- if($user)
- then
- (
- if($user/password=$pass)
- then
- (
- session:create(),
- session:set-attribute("login", $user/login),
- $login
- )
- else( "")
- )
- else
- (
- ""
- )
- };
Add Comment
Please, Sign In to add comment