Revision fc28d013 snf-astakos-app/astakos/im/management/commands/modifyuser.py

b/snf-astakos-app/astakos/im/management/commands/modifyuser.py
66 66
            dest='noadmin',
67 67
            default=False,
68 68
            help="Revoke user's admin rights"),
69
        make_option('--inactive',
70
            action='store_true',
71
            dest='inactive',
72
            default=False,
73
            help="Change user's state to inactive"),
69 74
        )
70 75
    
71 76
    def handle(self, *args, **options):
......
92 97
        if options['renew_token']:
93 98
            user.renew_token()
94 99
        
95
        user.save()
100
        if options.get('inactive'):
101
            user.is_active = False
102
        user.save()

Also available in: Unified diff