legacy_mode_checker = $legacy_mode_checker; } /** * @return array * * @throws User_Not_Found_Exception */ protected function get_user_status_data() { $trusted_devices_storage = $this->storage->get_trusted_devices_storage(); $user_storage = $this->storage->get_user_storage(); $options = $this->storage->get_options(); return array( 'is_plan_premium' => $options->is_plan_premium(), 'is_2fa_enabled' => $user_storage->is_2fa_enabled(), 'is_2fa_enabled_in_legacy_mode' => $this->legacy_mode_checker->is_2fa_enabled_in_legacy_mode(), 'is_totp_configured' => $user_storage->is_totp_configured(), 'is_totp_enabled' => $user_storage->is_totp_enabled(), 'is_sms_configured' => $user_storage->is_sms_configured(), 'is_sms_enabled' => $user_storage->is_sms_enabled(), 'are_offline_codes_configured' => $user_storage->are_offline_codes_configured(), 'are_offline_codes_enabled' => $user_storage->are_offline_codes_enabled(), 'trusted_device_count' => $trusted_devices_storage->get_trusted_device_count( $user_storage->get_user_id() ), 'reload_modal_disabled' => $user_storage->is_reload_modal_disabled(), ); } }