|
@@ -2,6 +2,7 @@
|
2
|
2
|
from .base import get_response
|
3
|
3
|
from ...exceptions import *
|
4
|
4
|
from ...client import WebUiClient as WebUiClient
|
|
5
|
+from lodel.auth.client import LodelSession as Session
|
5
|
6
|
from lodel import logger
|
6
|
7
|
import leapi_dyncode as dyncode
|
7
|
8
|
|
|
@@ -9,7 +10,13 @@ def signin(request):
|
9
|
10
|
msg=''
|
10
|
11
|
if request.method == 'POST':
|
11
|
12
|
WebUiClient.authenticate(request.form['inputLogin'], request.form['inputPassword'])
|
12
|
|
- return get_response('users/welcome.html')
|
|
13
|
+ logger.debug(WebUiClient.session().datas)
|
|
14
|
+ uid=WebUiClient.session().datas['__auth_user_infos']['uid']
|
|
15
|
+ leoclass=WebUiClient.session().datas['__auth_user_infos']['leoclass']
|
|
16
|
+ query_filter=list()
|
|
17
|
+ query_filter.append((leoclass.uid_fieldname()[0],' = ', uid))
|
|
18
|
+ username = leoclass.get(query_filter)
|
|
19
|
+ return get_response('users/welcome.html', username = username)
|
13
|
20
|
else:
|
14
|
21
|
return get_response('users/signin.html')
|
15
|
22
|
|