Revision abf57c77 snf-astakos-app/astakos/im/management/commands/user-modify.py
b/snf-astakos-app/astakos/im/management/commands/user-modify.py | ||
---|---|---|
114 | 114 |
dest='accept', |
115 | 115 |
action='store_true', |
116 | 116 |
help="Accept user"), |
117 |
make_option('--verify', |
|
118 |
dest='verify', |
|
119 |
action='store_true', |
|
120 |
help="Verify user email"), |
|
117 | 121 |
make_option('--reject', |
118 | 122 |
dest='reject', |
119 | 123 |
action='store_true', |
... | ... | |
169 | 173 |
else: |
170 | 174 |
print "Account rejected" |
171 | 175 |
|
176 |
if options.get('verify'): |
|
177 |
res = activation_backend.handle_verification( |
|
178 |
user, |
|
179 |
user.verification_code) |
|
180 |
#activation_backend.send_result_notifications(res, user) |
|
181 |
if res.is_error(): |
|
182 |
print "Failed to verify.", res.message |
|
183 |
else: |
|
184 |
print "Account verified (%s)" % res.status_display() |
|
185 |
|
|
172 | 186 |
if options.get('accept'): |
173 | 187 |
res = activation_backend.handle_moderation(user, accept=True) |
174 | 188 |
activation_backend.send_result_notifications(res, user) |
Also available in: Unified diff