Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get non-activated users

  • Avatar of Travel-Junkie
    Boris
    Participant

    @travel-junkie

    Here’s a little snippet I use on a lot of BP sites. It basically gets all users that registered on your site but for whatever reason never activated their account. You can then manually follow up on their registration.

    I usually put it on a settings page of some custom plugin I wrote for the site.

    `<?php
    global $wpdb;

    $not_active = $wpdb->get_results( $wpdb->prepare( “SELECT um.user_id, um.meta_value, u.user_email, u.display_name, u.user_login, u.user_registered FROM {$wpdb->usermeta} um INNER JOIN {$wpdb->users} u ON um.user_id = u.ID WHERE um.meta_key = ‘activation_key’” ) );
    if( $not_active ):
    ?>

    Non-activated Users

    <?php
    foreach( $not_active as $key => $val ): ?>

    ID Display Name Username Email Key Registration Date
    ID Display Name Username Email Key Registration Date
    user_id; ?> display_name; ?> user_login; ?> user_email; ?> meta_value; ?> user_registered; ?>

    `

Viewing 11 replies - 1 through 11 (of 11 total)
  • Avatar of paulhastings0
    paulhastings0
    Participant

    @paulhastings0

    Oh wow, thanks for sharing that. I hope you plan on sharing this on @bowromir‘s new website that’s launching next week, bp-tricks.com (cause if you don’t, then I will :P ).

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    @paulhastings0 – are you suggesting we should copy good code snippets from these forums across to a 3rd party site that will sell themes? That’s sounds like a lot of freely acquired content and SEO for what’s ostensibly a commercial business.

    I’m generally happy to submit and publish code to help people on these forums (and for them to use how they see fit, commercial or otherwise). It will occasionally be abused, and there are spam sites that will trawl and re-publish as their own work, and we can’t prevent that.

    However, if I thought it was being republished blatantly with little added value, as you suggest, as an offering from another business, I would be much more reluctant to publish it in the first place.

    Avatar of Bowe
    Bowe
    Participant

    @bowromir

    Hi @rogercoathup,

    Woow you almost make me feel guilty now! You make a few valid points, and I think the “problem” is that bp-tricks.com currently shows a big homepage offering my theme, while the actual community is not yet online. This might give you the impression it’s purely about business and making profit, and that is certainly not the case. It’s hard to defend myself when I only have a pre-order page to show, but if you read my reply here: http://buddypress.org/community/groups/creating-extending/forum/topic/bp-slick-probably-the-best-bp-theme-ive-ever-seen/#post-73078 you hopefully have a better idea of what I’m trying to do.

    I’ve been on this forums for a long time, and I’ve come across so many awesome tips and tricks which are only seen by a few, and lost for so many. I can’t tell you how many times I’ve looked for a tricks which I KNOW is here somewhere, but impossible to find back. That’s how BP-Tricks was born, and it will hopefully become a very nice resource for buddypress users. No ads, only BuddyPress related content, and no subscription models or anything like that. If you want to purchase a premium theme you can, and you’ll receive support for that, but it will not be promoted with ads or constant posts about why you should buy a Premium Theme or anything.

    I hope that BP-Tricks becomes something like WooThemes or NetTuts.. have a huge bunch of cool resources and free stuff, while at the same time providing good support and nice designs/themes for people who wish to use that service. I personally have no problems with these kinds of services as long as you strike a balance between offering awesome stuff for free, and asking some money for certain services (in my case a Theme).

    This has become quite a long reply :D sorry for that :)

    Avatar of Travel-Junkie
    Boris
    Participant

    @travel-junkie

    Generally speaking I don’t have a problem with websites reposting things like short code-snippets. When your feeds get scraped or whole articles are copied, that’s when things become hairy. The way things should be handled on bp-tricks to avoid any hassle is to give credit to the original source whenever possible. wprecipes.com, for example, does a pretty good job at that.

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    Hi @bowromir,

    This has the makings of a good debate, (and nothing to do with “get non activated users”.. Someone close this thread!)

    I want to argue with you, refute your points, etc., etc. – but in reality, I tend to agree with a lot of them.

    You are right, this site is very poor when it comes to finding information – even, as you point out, “how to” information (tricks… I hate that word!) that you know you read just a few days ago.

    I’ve seen little constructive feedback, desire or direction from Automattic on this. So, I understand the motivation to create a separate site that attempts to do the job of presenting technical “how to” information well (and easily searchable).

    I’m a little uncomfortable though about mixing your commercial side (themes) in the same site as the community resource, but accept there are arguments each way. I don’t know much about Adii and WooThemes, but suspect a lot of their content is self generated, or produced by their theme users. Where I worry about the ethics is if things are simply taken from this site (or others) and represented as “another great trick brought to you by Bowe”.

    Ok, enough of hijacking this thread – and @travel-junkie‘s excellent snippet. Let’s talk separately sometime.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @travel-junkie Along with due attribution should also go the common courtesy of requesting permission and of not assuming that because something is posted publicly that that means it’s free to be copied as this is generally not the case.

    With a tiny moderation hat on I would state for the record that this thread, should it continue, is not about bp-tricks in particular please, lest it feel like unfair judgment is being passed, which isn’t deserved.

    On the matter of ‘tips & tricks’ getting lost on this project home site I would agree but that is an issue that is to be addressed by the reworking of the codex for the site and that this is where many code snippets will be gathered and presented as things progress, as for that being replicated elsewhere I pass no comment either way.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    As Roger has pointed out the thread has gone off tangent so I’ll invoke ‘Hittler’, ‘Nazis’ on it and if there are no further comments by the participants we’ll close it off.
    (if unsure of the ‘Hitler’ rule stw :) )

    Avatar of Bowe
    Bowe
    Participant

    @bowromir

    I think we can continue this “debate” through our profile stream, no problem hnla, you can leave your moderator hat off for today. If you REALLY want to act tough and show your power, I could write another post and throw around some abuse towards some BP.org mods (Be ready Paul).

    ontopic: It is an awesome snippet.. Like so many of Boris his snippets are pretty much awesome (which reminds me that I still need to hire him for awesome stuff :-))

    Avatar of Travel-Junkie
    Boris
    Participant

    @travel-junkie

    Too right!! Let’s close this topic. My original post is feeling really left out by all that discussion that has nothing to do with it :) Good discussion, though!

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @bowromir I was trying to ensure the thread didn’t necessarily run on seeming to be focused at your site, this was trying to be kind! As for Moderators hat actually no it can’t ever be left off that is one of the burdens incurred in the responsibility, and I definitely do not feel the need to act tough and I trust that was a joke ;-) as for showing power that is the mark of a BAD moderator I’ve been doing this sort of thing for far too long to be feeling as though I needed to demonstrate power, also too old to think that’s important.

    I’ll close the thread though now which is about the only power I do have :)

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.