Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
red_brick_board
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ciella Francisco
red_brick_board
Commits
e9dfb33e
Commit
e9dfb33e
authored
Mar 12, 2024
by
gab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug with google log in using redundancy
parent
283d1150
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
views.py
redbrickboard/accounts/views.py
+3
-3
No files found.
redbrickboard/accounts/views.py
View file @
e9dfb33e
...
@@ -78,14 +78,14 @@ def auth_receiver(request):
...
@@ -78,14 +78,14 @@ def auth_receiver(request):
if
"@ateneo.edu"
not
in
email
and
"@student.ateneo.edu"
not
in
email
and
"@alumni.ateneo.edu"
not
in
email
:
if
"@ateneo.edu"
not
in
email
and
"@student.ateneo.edu"
not
in
email
and
"@alumni.ateneo.edu"
not
in
email
:
return
HttpResponse
(
"Your login must be an ateneo email address. Try again <a href='./login'>here</a>"
,
status
=
403
)
return
HttpResponse
(
"Your login must be an ateneo email address. Try again <a href='./login'>here</a>"
,
status
=
403
)
if
logInUser
is
not
None
:
if
logInUser
is
not
None
:
pass
auth
.
login
(
request
,
logInUser
)
else
:
else
:
first_name
=
user_data
[
'given_name'
]
first_name
=
user_data
[
'given_name'
]
last_name
=
user_data
[
'family_name'
]
last_name
=
user_data
[
'family_name'
]
role
=
"STUDENT"
role
=
"STUDENT"
user
=
models
.
CustomUser
.
objects
.
create_user
(
email
=
email
,
password
=
password
,
first_name
=
first_name
,
last_name
=
last_name
,
role
=
role
)
user
=
models
.
CustomUser
.
objects
.
create_user
(
email
=
email
,
password
=
password
,
first_name
=
first_name
,
last_name
=
last_name
,
role
=
role
)
auth
.
login
(
request
,
logInUser
)
auth
.
login
(
request
,
logInUser
)
print
(
"Login Successful"
)
print
(
"Login Successful"
)
return
redirect
(
"index"
)
return
redirect
(
"index"
)
\ No newline at end of file
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