Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
djnro
Commits
1f83e8db
Commit
1f83e8db
authored
Nov 21, 2012
by
Leonidas Poulopoulos
Browse files
Added smarter email parsing from request.META dict
parent
1f9082cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
edumanage/views.py
View file @
1f83e8db
...
...
@@ -962,7 +962,13 @@ def user_login(request):
error_username
=
True
firstname
=
request
.
META
[
'HTTP_SHIB_INETORGPERSON_GIVENNAME'
]
lastname
=
request
.
META
[
'HTTP_SHIB_PERSON_SURNAME'
]
mail
=
request
.
META
[
'mail'
]
or
request
.
META
[
'HTTP_SHIB_INETORGPERSON_MAIL'
]
if
'mail'
in
request
.
META
:
mail
=
request
.
META
[
'mail'
]
elif
(
'HTTP_SHIB_INETORGPERSON_MAIL'
in
request
.
META
):
mail
=
request
.
META
[
'HTTP_SHIB_INETORGPERSON_MAIL'
]
else
:
mail
=
''
#organization = request.META['HTTP_SHIB_HOMEORGANIZATION']
entitlement
=
request
.
META
[
'HTTP_SHIB_EP_ENTITLEMENT'
]
if
settings
.
SHIB_AUTH_ENTITLEMENT
in
entitlement
.
split
(
";"
):
...
...
@@ -1013,7 +1019,7 @@ def user_login(request):
return
render_to_response
(
'status.html'
,
{
'error'
:
error
,},
context_instance
=
RequestContext
(
request
))
except
Exception
:
error
=
_
(
"Invalid login procedure
"
)
error
=
_
(
"Invalid login procedure
. Error: %s"
%
e
)
return
render_to_response
(
'status.html'
,
{
'error'
:
error
,},
context_instance
=
RequestContext
(
request
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment