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
SRCT
bookshare
Commits
6be60b80
Commit
6be60b80
authored
Apr 25, 2015
by
Daniel W Bond
Browse files
fixed peoplefinder callback finallygit pull origin master @yeomansiii
parent
b677357a
Changes
1
Hide whitespace changes
Inline
Side-by-side
bookshare/core/cas_callbacks.py
View file @
6be60b80
...
@@ -28,12 +28,19 @@ def create_user(tree):
...
@@ -28,12 +28,19 @@ def create_user(tree):
if
user_created
:
if
user_created
:
user
.
email
=
"%s@%s"
%
(
username
,
settings
.
ORGANIZATION_EMAIL_DOMAIN
)
user
.
email
=
"%s@%s"
%
(
username
,
settings
.
ORGANIZATION_EMAIL_DOMAIN
)
# print "hello"
print
"hello"
# name_list = pfinfo(str(username))
name_list
=
pfinfo
(
str
(
username
))
# print "world"
print
name_list
,
"name_list"
# user.first_name = name_list[1].rstrip()
first_name
=
name_list
[
1
].
lstrip
().
split
(
' '
)
# print "something"
if
len
(
first_name
)
>
1
:
# user.last_name = name_list[0]
no_mi
=
first_name
[:
-
1
]
user
.
first_name
=
' '
.
join
(
no_mi
)
else
:
user
.
first_name
=
' '
.
join
(
first_name
)
last_name
=
name_list
[
0
]
user
.
last_name
=
name_list
[
0
]
print
"world"
user
.
save
()
user
.
save
()
new_student
=
Student
.
objects
.
create
(
user
=
user
)
new_student
=
Student
.
objects
.
create
(
user
=
user
)
new_student
.
save
()
new_student
.
save
()
...
...
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