Skip to content

Commit b7ff8e1

Browse files
committed
fix unknown error on admin screen when user activation enabled
1 parent 8491aed commit b7ff8e1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

server/src/main/java/password/pwm/svc/token/TokenService.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import password.pwm.config.option.DataStorageMethod;
3636
import password.pwm.config.option.MessageSendMethod;
3737
import password.pwm.config.option.TokenStorageMethod;
38+
import password.pwm.config.profile.ActivateUserProfile;
3839
import password.pwm.config.profile.ForgottenPasswordProfile;
3940
import password.pwm.config.profile.NewUserProfile;
4041
import password.pwm.error.ErrorInformation;
@@ -476,16 +477,17 @@ private static boolean tokensAreUsedInConfig( final Configuration configuration
476477
return true;
477478
}
478479
}
479-
return true;
480480
}
481481

482-
483482
if ( configuration.readSettingAsBoolean( PwmSetting.ACTIVATE_USER_ENABLE ) )
484483
{
485-
final MessageSendMethod activateMethod = configuration.readSettingAsEnum( PwmSetting.ACTIVATE_TOKEN_SEND_METHOD, MessageSendMethod.class );
486-
if ( MessageSendMethod.NONE != activateMethod )
484+
for ( final ActivateUserProfile activateUserProfile : configuration.getUserActivationProfiles().values() )
487485
{
488-
return true;
486+
final MessageSendMethod activateMethod = activateUserProfile.readSettingAsEnum( PwmSetting.ACTIVATE_TOKEN_SEND_METHOD, MessageSendMethod.class );
487+
if ( MessageSendMethod.NONE != activateMethod )
488+
{
489+
return true;
490+
}
489491
}
490492
}
491493

0 commit comments

Comments
 (0)