Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Confirm Email

This discussion is related to the Members List Enhanced addon.

Is there any way to hide the 'confirm email' statused people from the member list? If not, consider it a suggestion for someday in the future :)

Comments

  • peregrineperegrine MVP
    edited July 2013

    try the other members plugins, they might have that feature. this one doesn't.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • R_JR_J Ex-Fanboy Munich Admin

    @Kersus: even if you are not a programmer, it is worth looking at the code. Vanilla is quite easy to understand. If the files in a plugin are structured, the file with the word "model" should carry all the database queries.

    peregrine structured it nicely and so you find the SQL in the file class.memberslistenhmodel.php. In fact, there are 3 SQLs and you'll have to add code to all of them.

    You'll have to find out how you can identify the users you do not like to see in the list. No chance to test it right now for me, but I there are two possibilities: an easy one and a more complicated. I suppose you'd need the more complicated one in this case.

    1. The easiest would be, if there is a field in the user table, since the sql already queries this table. If so, you just have to specify one more condition. Just add another ->Where()line below the three existing ones. I have to guess: if there is a field like "Confirmed" for those users, your line should read ->Where('Confirmed', TRUE)

    2. If the information you need is in another table, you would have to join that table to the query. That's not as easy as the first one, but still nothing too complicated. If you have used SQL before it will be a snap.
      I think an unconfirmed member has the specific role. So you have to join that table called UserRole. Tables UserRole and User share one common key and that is UserID. So you can join both tables on this column and your result will match the userrole to the existing memeberlist from where you can exclude it the same way described in 1. If you look at peregrine SQL, you see that he already joined a table, so let's just add another one ->LeftJoin('UserRole ur', 'u.UserID = ur.UserID'). That's it! Now we can specify, that we do not want users with the unconfirmed role (in my test, its role id is 3) ->Where('ur.RoleID <> 3')
      So you see, even if it gets complicated, you'll have to add (3 times) two lines of code! :-)

    I'm not quite sure if copying what I have written solves your problem, but it should lead you to the desired result.

    hgtonightKersusUnderDog
  • KersusKersus New
    edited July 2013

    I gotcha @peregrine :) It wasn't meant to be a push, just a query. It's a fantastic plugin regardless. I tried the others and like yours best although they were good too.

    Thank you @R_J. My programming knowledge is old (Turbo Pascal, Turing, Dbase/Rbase (yes database)) and far to unused. I keep up on HTML and need to learn more javascript and have rudimentary knowledge of PERL and PhP. I plan to get back into programming as I loved it 20 years ago but I veered into another path at the time. I'm irritated with how much I've forgotten to my shame.

    You have given me a start and food for thought. If I stick with Vanilla (depends on my core users) I hope to be here developing plugins and helping the community. You and @hgtonight have been especially helpful. Thank you.

  • R_JR_J Ex-Fanboy Munich Admin

    If you have chosen that each unconfirmed user should belong to the role "unconfirmed" (under Registration in the dashboard) and you have the possibility to test it, try inserting the following lines below each "->From('User u')" you find in class.memberslistenhmodel.php:

    ->LeftJoin('UserRole ur', 'u.UserID = ur.UserID')
    ->Where('ur.RoleID <> 3')
    

    As far as I can see, this should do what you like to achieve. No need to start programming again, I just waned to encourage you.

    Kersus
  • peregrineperegrine MVP
    edited July 2013

    @Kersus said:
    I gotcha peregrine :) It wasn't meant to be a push, just a query. It's a fantastic plugin regardless.

    Sometimes I add new features, for the fun of it, sometimes I write features based on donations.

    If and when I get donations for this plugin, I'll add more features.

    image

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    Kersus
  • hgtonighthgtonight ∞ · New Moderator

    @Kersus said:
    You and hgtonight have been especially helpful. Thank you.

    Thank you for your kind words.

    @Kersus said:
    My programming knowledge is old (Turbo Pascal, Turing, Dbase/Rbase (yes database)) and far to unused.

    I just landed a maintenance project at my day job that involves rewriting some tools written in Pascal to a more... modern language. The point is, even old programming knowledge is helpful!

    Good luck!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    Kersus
  • @peregrine said:
    If and when I get donations for this plugin, I'll add more features.

    I getcha. I spend way too much time setting this up and tinkering with it when I could be doing billable work myself. Trying to give other people fun free things to do can be taxing. Trying to make it a business is a whole different step. Doing my sales tax forms for my business as we speak. I guess I could set up donations on the forum to forward to plugin designers....

  • peregrineperegrine MVP
    edited August 2013

    Well, I added a config to exclude a role - see the readme. All you need to do is add the config statement and the proper roleid.

    BUT if you want to

    only include one role.
    
    e.g. to show only members - you could change the config statement described in the readme to "8"
    
    and change
    
    ur.RoleID<>  to 
    
    ur.RoleID
    
    everywhere in class.memberslistenhmodel.php
    

    @Kersus said:
    I spend way too much time setting this up and tinkering with it when I could be doing billable work myself.

    precisely.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    R_JhgtonightKersus
Sign In or Register to comment.