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
synnefo
Commits
e26bc7ca
Commit
e26bc7ca
authored
May 16, 2013
by
Kostas Papadimitriou
Browse files
astakos: Allow admin to verify user from command line
using the new option `--verify` added in `user-modify` command
parent
324d2797
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/management/commands/user-modify.py
View file @
e26bc7ca
...
...
@@ -114,6 +114,10 @@ class Command(BaseCommand):
dest
=
'accept'
,
action
=
'store_true'
,
help
=
"Accept user"
),
make_option
(
'--verify'
,
dest
=
'verify'
,
action
=
'store_true'
,
help
=
"Verify user email"
),
make_option
(
'--reject'
,
dest
=
'reject'
,
action
=
'store_true'
,
...
...
@@ -169,6 +173,16 @@ class Command(BaseCommand):
else
:
print
"Account rejected"
if
options
.
get
(
'verify'
):
res
=
activation_backend
.
handle_verification
(
user
,
user
.
verification_code
)
#activation_backend.send_result_notifications(res, user)
if
res
.
is_error
():
print
"Failed to verify."
,
res
.
message
else
:
print
"Account verified (%s)"
%
res
.
status_display
()
if
options
.
get
(
'accept'
):
res
=
activation_backend
.
handle_moderation
(
user
,
accept
=
True
)
activation_backend
.
send_result_notifications
(
res
,
user
)
...
...
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