Example #1
0
 def invoke(self, *args, **options):
     organization_ = organization.get(domain=options['organization'])
     if organization_ == None:
         raise CommandError('unknown organization')
     username = "******" % (options['username'], organization_.suffix)
     user_ = user.get(username=username)
     if user_ == None:
         raise CommandError('unknown user')
     user_.is_staff = not options['disable']
     user_.save()
Example #2
0
 def approve(self, request, user_pk):
     registry.signal('user_approval', user=user.get(pk=user_pk), send_invitation=True)