mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-19 04:17:58 +00:00
feat(core): Add in user settings to force password change for a user when logging
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
@class NSArray;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class NSNumber;
|
||||
|
||||
@interface SOGoUserSettings : SOGoDefaultsSource
|
||||
|
||||
@@ -35,6 +36,8 @@
|
||||
- (NSArray *) subscribedAddressBooks;
|
||||
- (NSString *) userPrivateSalt;
|
||||
- (NSString *) userPublicSalt;
|
||||
- (void)enableForceResetPassword;
|
||||
- (void)disableForceResetPassword;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -116,4 +116,19 @@ static Class SOGoUserProfileKlass = Nil;
|
||||
return salt;
|
||||
}
|
||||
|
||||
- (void) enableForceResetPassword
|
||||
{
|
||||
[self setObject: [NSNumber numberWithInt:1] forKey: @"ForceResetPassword"];
|
||||
[self synchronize];
|
||||
}
|
||||
|
||||
- (void) disableForceResetPassword
|
||||
{
|
||||
if ([self objectForKey: @"ForceResetPassword"]) {
|
||||
[self removeObjectForKey: @"ForceResetPassword"];
|
||||
[self synchronize];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user