mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-22 15:13:18 +00:00
feat(password-recovery): Add password recovery with secret question or secondary email
This commit is contained in:
@@ -1638,4 +1638,40 @@ static NSArray *reminderValues = nil;
|
||||
return results;
|
||||
}
|
||||
|
||||
// Password recovery
|
||||
|
||||
- (NSArray *) passwordRecoveryList
|
||||
{
|
||||
return [NSArray arrayWithObjects:
|
||||
SOGoPasswordRecoveryDisabled,
|
||||
SOGoPasswordRecoveryQuestion,
|
||||
SOGoPasswordRecoverySecondaryEmail,
|
||||
nil];
|
||||
}
|
||||
|
||||
- (NSArray *) passwordRecoveryQuestionList
|
||||
{
|
||||
return [NSArray arrayWithObjects:
|
||||
SOGoPasswordRecoveryQuestion1,
|
||||
SOGoPasswordRecoveryQuestion2,
|
||||
SOGoPasswordRecoveryQuestion3,
|
||||
nil];
|
||||
}
|
||||
|
||||
- (NSString *) itemPasswordRecoveryText
|
||||
{
|
||||
return [self commonLabelForKey: [NSString stringWithFormat: @"passwordRecovery_%@",
|
||||
item]];
|
||||
}
|
||||
|
||||
- (BOOL) shouldDisplayPasswordRecovery
|
||||
{
|
||||
return [[SOGoSystemDefaults sharedSystemDefaults] isPasswordRecoveryEnabled];
|
||||
}
|
||||
|
||||
- (BOOL) shouldDisplayPasswordSection
|
||||
{
|
||||
return [self shouldDisplayPasswordRecovery] || [self shouldDisplayPasswordChange];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user