Quantcast
Channel: new-user-approve – WordPress.org Forums
Viewing all 121 articles
Browse latest View live

Josh Harrison on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

Try to use the new_user_approve_request_approval_message_default filter in place of the new_user_approve_request_approval_message. The reason why it wasn't working is because you were using a filter that runs after the emails have been formatted with the email tags.

Let me know how it goes.


Josh Harrison on "[Plugin: New User Approve] User able to login to site before they are approved"

$
0
0

I just tried it out and was not able to log in. Got this error message:

ERROR: YOUR ACCOUNT HAS TO BE CONFIRMED BY AN ADMINISTRATOR BEFORE YOU CAN LOGIN.

Have you been able to fix it since you posted this?

Josh Harrison on "[Plugin: New User Approve] Custom registration process"

$
0
0

It should work. You'll have to try it out. Post here if you have any issues.

For what it's worth, I have created a custom registration form and it worked without any problems.

Josh Harrison on "[Plugin: New User Approve] Cancel Registration"

$
0
0

You would have to add a link to something that gives them that option.

doumlegare on "[Plugin: New User Approve] Custom email message"

$
0
0

Hi,
i am trying to modify the message to user when thay sign up.

I took a look at your filter and i'm not sure to undertand well.

I also used Cimy custom field for the welcome email with userbame, password and loginlink.

So two questions:

Can i disable your email sent to new user with information and use mine with Cimy?

Can i have small explanation to use your filter to customize that message?
thank you

https://wordpress.org/plugins/new-user-approve/

hernangalvan on "[Plugin: New User Approve] User able to login to site before they are approved"

$
0
0

Having exactly the same issue. It happens only after registration. After registering and showing message if i click in a private area it autologins. But when i close sessiond and try to do it again it works correctly and wont let the user in.

deeve007 on "[Plugin: New User Approve] User able to login to site before they are approved"

$
0
0

It also allows the user to login even if you choose to "deny" user. Quite a big problem.

Nathaniel T on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

Thank you for your reply Josh. I am sorry it has taken such a while for me to respond.

I have tried to implement adding a new email tag to include the user's first and last name in the approval email to the admin, but it still doesn't seem to be working for me.

This is my latest code. I am getting an error at the moment in regard to adding the new email tag. It seems that perhaps the class is no initialized or for some reason the pre-existing tags are not being gathered.

Warning: array_key_exists() expects parameter 2 to be array, null given in [mysite]\wp-content\plugins\new-user-approve\includes\email-tags.php on line 73

Warning: Invalid argument supplied for foreach() in [mysite]\wp-content\plugins\new-user-approve\includes\email-tags.php on line 281
add_action( 'nua_email_tags', 'mytheme_extras_nua_add_email_tags');
function mytheme_extras_nua_add_email_tags () {
	if (! nua_email_tag_exists( 'first_last_name' )) {
		nua_add_email_tag( 'first_last_name', __( 'The users first and last name.', 'mytheme' ), 'mytheme_extras_nua_email_tag_user_first_last_name', array( 'email' ) );
	}
}
function mytheme_extras_nua_email_tag_user_first_last_name( $attributes ) {
	return '' . $attributes['first_name'] . ' ' . $attributes['last_name'];
}
add_filter( 'new_user_approve_notification_message_default', 'mytheme_extras_nua_approval_notification_message', 10, 2 );
function mytheme_extras_nua_approval_notification_message($message) {
	$message = __( '{first_last_name} — {username} — ({user_email}) has requested a username at {sitename}', 'new-user-approve' ) . "\n\n";
	$message .= "{site_url}\n\n";
	$message .= __( 'To approve or deny this user access to {sitename} go to', 'new-user-approve' ) . "\n\n";
	$message .= "{admin_approve_url}\n\n";

	return $message;
}

Nathaniel T on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

A follow up question, does your Options add-on allow for including the user's other profile meta fields in the approval notification email? Fields such as First Name and Last Name etc. I am adding those fields to the registration form.

Josh Harrison on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

Currently, the Options addon does not have that functionality. I'm working on the newest version which will support that.

And to answer your question about your new email tag, here is some code that works. You were close.

add_action( 'nua_email_tags', 'mytheme_extras_nua_add_email_tags');
function mytheme_extras_nua_add_email_tags( $email_tags ) {
	$email_tags[] = array(
		'tag'         => 'first_last_name',
		'description' => __( 'The users first and last name.', 'mytheme' ),
		'function'    => 'mytheme_extras_nua_email_tag_user_first_last_name',
		'context'     => array( 'email' ),
	);

	return $email_tags;
}
function mytheme_extras_nua_email_tag_user_first_last_name( $attributes ) {
	return '' . $attributes['first_name'] . ' ' . $attributes['last_name'];
}
add_filter( 'new_user_approve_notification_message_default', 'mytheme_extras_nua_approval_notification_message', 10, 2 );
function mytheme_extras_nua_approval_notification_message($message) {
	$message = __( '{first_last_name} — {username} — ({user_email}) has requested a username at {sitename}', 'new-user-approve' ) . "\n\n";
	$message .= "{site_url}\n\n";
	$message .= __( 'To approve or deny this user access to {sitename} go to', 'new-user-approve' ) . "\n\n";
	$message .= "{admin_approve_url}\n\n";

	return $message;
}

Nathaniel T on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

Thank you for your response Josh! Looks like I was in fact closer than I thought. Unfortunately the new email tag still doesn't display the user's names. Instead that area of the email is blank, such that the attributes are not being called or there is no data for them. The user's first and last name are saving properly from the registration form as I can see from their profile in wp-admin. Just thinking out loud… Perhaps this message is sending before the data is saved, though that doesn't make much sense. Or perhaps those attributes are not available to be called.

— Username: jdaniels — (jdaniels@example.com) has requested a username at My Website Name

gwolfman on "[Plugin: New User Approve] is captcha use possible?"

Scott Allen on "[Plugin: New User Approve] is captcha use possible?"

$
0
0

It won't be possible until the author fixes the plugin. That's the same issue I brought up in this thread. No registration anti-spam plugins (CAPTCHA or otherwise) will work with it since it creates the new user before the error check takes place.

dpbrucks on "[Plugin: New User Approve] set own password? and different admin to approve?"

$
0
0

First, I am not very knowledgeable - need clear direction.

website is http://www.mhcea.com

we want members of our organization to be able to create their own username and password. I have loaded this plug in and believe I have it set.

Questions: will the new user be able to create their own name and password? after read the FAQ's it appears to me that no, they can't. Our users want that option.

I am currently the admin and want to set up an additional admin account with a different email address to allow that person to do the approvals. I saw that question in the FAQ's but didn't find an answer. Can this be accomplished? If so, how?

Thanks for understanding, I am managing the site for our just over 100 members and they are requesting their own sign on's rather than one global sign on for all 100.

Dorothy

https://wordpress.org/plugins/new-user-approve/

wgsieber on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

I'm having a similar issue and I have tried to make this code work for me, but without any success. what i'm trying to accomplish is to gather some custom information at registration and have that data included in the approval notice email. I'm using UPME, (user profiles made easy), to gather my custom registration data.

these are my meta keys that I would like included in the notice:
first_name
last_name
partner_type
phone_number

is there a way to add these? because I've tried plugging them into the code above and it still will not show up.

Thank you


Scott Allen on "[Plugin: New User Approve] Plugin calls home - please fix or add option for user permission"

$
0
0

Hi Josh,

I wanted to bring another issue to your attention.

On the settings page this plugin calls home to populate the meta boxes for "Updates", "Support", and "Feedback".

The code in question is in the file 'new-user-approve/includes/admin-approve.php' on lines 219-224 and 254-261:

public function add_meta_boxes() {
	add_meta_box( 'nua-approve-admin', __( 'Approve Users', 'new-user-approve' ), array( $this, 'metabox_main' ), 'users_page_new-user-approve-admin', 'main', 'high' );
	add_meta_box( 'nua-updates', __( 'Updates', 'new-user-approve' ), array( $this, 'metabox_ajax' ), 'users_page_new-user-approve-admin', 'side', 'default', array( 'url' => 'http://newuserapprove.com/wp-json/posts/52' ) );
	add_meta_box( 'nua-support', __( 'Support', 'new-user-approve' ), array( $this, 'metabox_ajax' ), 'users_page_new-user-approve-admin', 'side', 'default', array( 'url' => 'http://newuserapprove.com/wp-json/posts/54' ) );
	add_meta_box( 'nua-feedback', __( 'Feedback', 'new-user-approve' ), array( $this, 'metabox_ajax' ), 'users_page_new-user-approve-admin', 'side', 'default', array( 'url' => 'http://newuserapprove.com/wp-json/posts/56' ) );
}

public function metabox_ajax( $post, $metabox = array() ) {
	$response = wp_remote_get( $metabox['args']['url'] );
	if ( wp_remote_retrieve_response_code( $response ) == 200 ) {
		$body = wp_remote_retrieve_body( $response );
		$details = json_decode( $body );
		print $details->content;
	}
}

As you're probably aware from the plugin developer guidelines, that's kindof a big deal, as they don't want us to be doing that because of privacy and security risks.

I realize you most likely mean no harm and probably aren't collecting any data with this, but a savvy/deceptive developer could do just that.

According to the plugin developer guidelines, in rule 7, it says:

No "phoning home" without user's informed consent. This seemingly simple rule actually covers several different aspects:

...

  • All images and scripts shown should be part of the plugin. These should be loaded locally. If the plugin does require that data is loaded from an external site (such as blocklists) this should be made clear in the plugin's admin screens or description. The point is that the user must be informed of what information is being sent where.

Thanks in advance for fixing this!

- Scott

https://wordpress.org/plugins/new-user-approve/

Ipstenu (Mika Epstein) on "[Plugin: New User Approve] Plugin calls home - please fix or add option for user permission"

Scott Allen on "[Plugin: New User Approve] Plugin calls home - please fix or add option for user permission"

$
0
0

@Ipstenu: You got it! Will do in the future. :)

bestdie3 on "[Plugin: New User Approve] Custom validation help"

$
0
0

Since 'create_new_user' uses 'register_post' it validates the registration form before 'registration_errors' fires. This only permits custom validation to work if the username or email has errors. If they don't, the form will ignore any function with the hook 'registration_errors'. The WordPress website states to never validate forms using 'register_post'. So, my question is how do I add custom validation? Should i just add to to the core functions of the plugin like so:

public function create_new_user( $user_login, $user_email, $errors ) {
		$errors->add( 'demo_error', __( '<strong>ERROR</strong>: This is a demo error.', 'my_textdomain' ) );
		if ( $errors->get_error_code() ) {
			return;
		}

		// create the user
		$user_pass = wp_generate_password( 12, false );
		$user_id = wp_create_user( $user_login, $user_pass, $user_email );
		if ( !$user_id ) {
			$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
		}
	}

What are my options. Is this code really unsafe like the WordPress site states?

https://wordpress.org/plugins/new-user-approve/

Hjsurk on "[Plugin: New User Approve] How to customize the approval message to the admin?"

$
0
0

Thank you for your response Josh! Looks like I was in fact closer than I thought. Unfortunately the new email tag still doesn't display the user's names. Instead that area of the email is blank, such that the attributes are not being called or there is no data for them. The user's first and last name are saving properly from the registration form as I can see from their profile in wp-admin. Just thinking out loud… Perhaps this message is sending before the data is saved, though that doesn't make much sense. Or perhaps those attributes are not available to be called.

— Username: jdaniels — (jdaniels@example.com) has requested a username at My Website Name

I'm having the same problem as Nathaniel describes. I got everything working but it just shows a blank space. I want to use the WooCommerce registration fields in my approval e-mail so I can see which company (billing_company) and the name (billing_first_name and billing_last_name) has registered to the website.

I've already got them set up into my registration but the e-mail just fails to show extra fields in any way.

On the support forum I found a link to https://newuserapprove.com/support/faq/edit-email-content but that just gives me a 404 page.

Viewing all 121 articles
Browse latest View live