Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPMS_SMTP_AUTH Constant defined to false - Username and password still editable #138

Open
neovision-host opened this issue Aug 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@neovision-host
Copy link

When WPMS_SMTP_AUTH is set to false, the username and password fields should be disabled.

image

Like this :
image

This patch fix the problem

--- a/src/Providers/OptionsAbstract.php	2024-08-27 15:18:46.063537256 +0200
+++ b/src/Providers/OptionsAbstract.php	2024-08-27 15:30:39.056609839 +0200
@@ -331,7 +331,7 @@
 		</div>

 		<!-- SMTP Username -->
-		<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-user" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-text wp-mail-smtp-clear <?php echo ! $this->connection_options->is_const_defined( $this->get_slug(), 'auth' ) && ! $this->connection_options->get( $this->get_slug(), 'auth' ) ? 'inactive' : ''; ?>">
+		<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-user" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-text wp-mail-smtp-clear <?php echo $this->connection_options->is_const_defined( $this->get_slug(), 'auth' ) && ! $this->connection_options->get( $this->get_slug(), 'auth' ) ? 'inactive' : ''; ?>">
 			<div class="wp-mail-smtp-setting-label">
 				<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-user"><?php esc_html_e( 'SMTP Username', 'wp-mail-smtp' ); ?></label>
 			</div>
@@ -345,7 +345,7 @@
 		</div>

 		<!-- SMTP Password -->
-		<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-pass" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-password wp-mail-smtp-clear <?php echo ! $this->connection_options->is_const_defined( $this->get_slug(), 'auth' ) && ! $this->connection_options->get( $this->get_slug(), 'auth' ) ? 'inactive' : ''; ?>">
+		<div id="wp-mail-smtp-setting-row-<?php echo esc_attr( $this->get_slug() ); ?>-pass" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-password wp-mail-smtp-clear <?php echo $this->connection_options->is_const_defined( $this->get_slug(), 'auth' ) && ! $this->connection_options->get( $this->get_slug(), 'auth' ) ? 'inactive' : ''; ?>">
 			<div class="wp-mail-smtp-setting-label">
 				<label for="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass"><?php esc_html_e( 'SMTP Password', 'wp-mail-smtp' ); ?></label>
 			</div>

I'm still available

Thanks,

@neovision-host neovision-host added the bug Something isn't working label Aug 28, 2024
@capuderg
Copy link
Contributor

Hi @neovision-host,

thank you for opening this GH issue and providing a fix.

Our team will fix this in the next plugin update.

Thank you and have a nice day!

@floasmf
Copy link

floasmf commented Dec 2, 2024

Hello,

With the latest version of the plugin the problem is still present.

Can you fix it?

Best regards,

@capuderg
Copy link
Contributor

capuderg commented Dec 2, 2024

Hey @floasmf,

I'm sorry, this was not included in the last plugin update. We'll try to release it as soon as possible.

Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants