Forum Replies Created

Viewing 15 replies - 1 through 15 (of 23 total)
  • Hi Alex,

    Yes, I am using the redirect in Settings->Other Settings. I am redirecting to a custom URL. The normal /?redirect={URL encoded URL} is missing from the link now, so I don’t know how to recover the original requested page.


    Hi Lars,

    I am using the Peter’s Login Redirect plugin, and have set up role-based redirects. So once a particular user with a defined role logs in they get redirected to the correct page.

    My issue is that I am trying to provide custom login screens depending on the link the user follows. I would like to know what the requested page is, but it would seem that UAM drops this information when it finds the user hasn’t logged in yet. I haven’t yet found a way around this.


    Same here. I can see it is an option, but it is greyed out. How do we enable this?

    I thought you might have had it there with the misspelling, but that wasn’t it. It wasn’t a plugin conflict either…but I did find what it was for anyone else who comes across this. It isn’t 'publicly_queryable'=>true it is actually 'public'=>true. With that set it shows the meta box whether publicly_queryable is true or false.

    Thanks for your help tracking down the problem.


    • This reply was modified 3 years, 1 month ago by daybo. Reason: spelling

    Hi Pippin,

    Thanks for the suggestion, but sadly that has had no effect. I still cannot see any meta box allowing me to restrict access on the CPT.

    Any other ideas?


    Hi Pippin,

    The custom post type is one I have created – it is very simple. The plugin just declares the custom post type and that is it.

    This is the plugin:

    function create_survey() {
    register_post_type( ‘survey’,
    ‘labels’ => array(
    ‘name’ => ‘Surveys’,
    ‘singular_name’ => ‘Survey’,
    ‘add_new’ => ‘Add New’,
    ‘add_new_item’ => ‘Add New Survey’,
    ‘edit’ => ‘Edit’,
    ‘edit_item’ => ‘Edit Survey’,
    ‘new_item’ => ‘New Survey’,
    ‘view’ => ‘View’,
    ‘view_item’ => ‘View Survey’,
    ‘search_items’ => ‘Search Surveys’,
    ‘not_found’ => ‘No Surveys found’,
    ‘not_found_in_trash’ => ‘No Surveys found in Trash’,
    ‘parent’ => ‘Parent Survey’

    ‘public’ => false,
    ‘publicly_queriable’ => false,
    ‘show_ui’ => true,
    ‘exclude_from_search’ => true,
    ‘show_in_nav_menus’ => false,
    ‘has_archive’ => false,
    ‘rewrite’ => false,
    ‘menu_position’ => 15,
    ‘supports’ => array( ‘title’, ‘editor’),
    ‘taxonomies’ => array( ” ),
    ‘menu_icon’ => ‘dashicons-clipboard’,

    add_action( ‘init’, ‘create_survey’ );

    Sorry, I’m an idiot… It was the Ghostery browser plugin that was blocking facebook connect. Once I whitelisted the site it re-appeared.

    Forget my last post. I bought it and tried it out and it does it exactly as you said, I am thrilled…Thank you!

    That looks perfect – exactly what I needed! Thank you.

    One question though. I am using the WooCommerce Product Add-ons plugin to add an Attendee name field – will this be available as one of the custom fields in the pro version?


    Hi Cory,

    Thanks for your message. There is nothing in the installer-log.txt that gives any indication of a problem, in fact the last line of it says:
    STEP1 COMPLETE @ 12:54:44 – TOTAL RUNTIME: 32.0079 sec.

    I’m not sure how to submit a ticket – is this through the pro version? I am happy to purchase the pro version, but I want to know that it will work first.


    Hi Josh,

    Like I said I have been messing about with it so much…:)

    Anyway, the suggestion you had (above) had no effect. But…I did discover what the problem is!

    There is no [user] key in the $attributes array. The keys in the array are [context] [user_login] [user_email] [admin_url]

    So to fix it all I had to do was extract the user ID from the username and use that to do a lookup on the first name, last name etc.

    function email_tag_name( $attributes ) {
    	$user = get_user_by( 'login', $attributes['user_login'] );
    	$name = $user->first_name . " " . $user->last_name;
     return $name;

    Thank you for all your help. I’ll get back in touch with @railmedia and let him know.

    Hi Josh,

    Thanks for taking a look. The code is below – but I’ve hacked about with it so much in my attempts to get it to work, I don’t know if I’m coming or going now.
    At this point I was just trying to get one additional field ‘first_name’ working before I added others.

    I have it in its own plugin:

    add_action( 'nua_email_tags', 'add_email_tags_first_name');
    function add_email_tags_first_name( $email_tags ) {
    	$email_tags[] = array(
    		'tag'         => 'firstname',
    		'description' => __( 'The users first name.', 'new-user-approve' ),
    		'function'    => 'email_tag_first_name',
    		'context'     => array( 'email' ),
    	return $email_tags;
    function nua_email_tags_attributes ( $content, $attributes ){
    	// Replace all tags
    	$content = pw_new_user_approve()->email_tags->do_tags( $content, $attributes );
    	// Return content
    	return $content;
    function email_tag_first_name( $attributes ) {
    	$user = $attributes['user'];
    	return $user->first_name;
    add_filter( 'new_user_approve_notification_message_default', 'user_registration_message', 10, 2 );
    function user_registration_message( $message ) {
    	$message = __( '{firstname} {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;

    Hi Josh,

    Sadly, my correction of the SQL wasn’t the the issue, just a red herring.
    I too am struggling to get data out and pass it through on the email too. I have been in touch with @railmedia to see if he ever managed it – but he didn’t.

    Can you shed any light on how we might achieve this? I want to pass things like first name, lastname along with the username and email.

    Your help is most appreciated.

    I know this is a little old, but looking at your code it would seem to me that your SQL is looking for the wrong thing:

    Where you have

    $user_id = $wpdb->get_var("SELECT ID FROM wp_users WHERE user_email='{username}'");

    shouldn’t that be:
    $user_id = $wpdb->get_var("SELECT ID FROM wp_users WHERE user_email='{user_email}'");

    replacing the {username} with {user_email}

    +1 for this. It would be useful to know if a post has been reported without having to continually check.

Viewing 15 replies - 1 through 15 (of 23 total)