Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2012, 02:04 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to pass users pw through email?

Ok long story short, hostmonster (my host) shut off my outgoing emails because someone reported the birthday email as spam. They said I need an auto opt out link put in place before they enable my outgoing emails.

I installed ... https://vborg.vbsupport.ru/showthread.php?t=246163 and then asked them to enable my emails. They said no because it's not an auto opt out. They said since the user has to click on the confirm button it's not automated.

So I need to know how to pass the users pw in the automated emails to them, and pass the userid and userpw back to the system in order to automatically log them in, and then automatically opt them out of the emails.

I don't think this is a good idea (to pass the login info back and forth), but it's what the host demands and I need to get it done asap.
Reply With Quote
  #2  
Old 07-10-2012, 02:22 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure how you'd go about doing that, but I have another idea that might work - put the email address on the url as a parameter, then use a plugin similar to the one for the mod you have installed excpet that the query would check the email address rather than the userid (which it could do without being logged in). It's true that with that scheme anyone who knew a member's email address could unsubscribe them, but that's not really a serious security issue. If you wanted, later you could add something like an automatic PM to the user telling them they'd been unsubscribed, so they could resubscribe if it's a mistake.

If you did implement this, one thing you might want to do is change the plugin code so that it only ever displays one message (like "thank you, you're unsubscribed") even if you're passed an invalid email, that way it couldn't be used to guess at member's emails.
Reply With Quote
  #3  
Old 07-10-2012, 02:44 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi again Kevin

I want to thank you for all of your help today sure made it go a lot faster However I don't have a clue about how to make this plugin. I thought that you had to login in order to change settings, are you saying that the plugin will change the settings for the user based on their email address without them having to log in?

I had an idea, include the form in the outgoing emails ... but would it work? I can't really test this as the host has outgoing emails turned off, and I don't have any email clients configured on my localhost
Reply With Quote
  #4  
Old 07-10-2012, 02:59 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
I want to thank you for all of your help today sure made it go a lot faster
You're welcome. Are you talking about over on vbulletin.com? I didn't really think anyone knew who I was over there because I have a different username.

Quote:
However I don't have a clue about how to make this plugin. I thought that you had to login in order to change settings, are you saying that the plugin will change the settings for the user based on their email address without them having to log in?
The plugin can do whatever it wants - it can check for a user being logged in, but it doesn't have to. But one thing I didn't really think of is that this method would mean customizing the email for each user by inserting the email address in the link. The existing mod currently doesn't do that because it knows the userid by being logged in.


Quote:
I had an idea, include the form in the outgoing emails ... but would it work? I can't really test this as the host has outgoing emails turned off, and I don't have any email clients configured on my localhost

You could write a plugin that checks the username and password if it was passed in a form, but it would have to be html email and so it would depend on the user viewing the mail in html.
Reply With Quote
  #5  
Old 07-10-2012, 03:06 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are klh over there right?

I'll have to go through this tomorrow as I'm a bit too tired to be working on it now

I mainly need this for the birthday emails since that is what has been reported by some disgruntled members.

Would it be as simple as replacing $username with whatever the email variable is?

So instead of saying hello John Lester blah blah blah it would say hello jlester@whatever.com

Then making a plugin (that's where I'll need the most help) that will set the user options without them having to login?
Reply With Quote
  #6  
Old 07-10-2012, 03:15 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
You are klh over there right?
Yeah, I guess I'll have to be more careful - I thought I was relatively anonymous over there.

It's late for me as well. I don't think inserting the address will be a problem. Maybe tomorrow I can throw something together.
Reply With Quote
  #7  
Old 07-10-2012, 11:34 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Morning Kevin

So I had a thought, all this plugin would have to do is move the user to a different user group when the "unsubscribe" link is clicked on from their email.
Reply With Quote
  #8  
Old 07-10-2012, 12:41 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could move the user to another group if that's what you want. The mod you have installed unsubscribes the user from admin emails using pretty much the same sql that we talked about in the other thread, so that should work too.

I've been thinking about this too. What I wanted was a way to either automatically add the link to every email that goes out, or else have a way to put something in the email body phrase that would insert the link. I haven't figured out either one yet. But that doesn't mean we couldn't come up with something just for the birthday emails, if that's your current problem. I was thinking I might come up with something general that could be released and might help others, but that can wait.
Reply With Quote
  #9  
Old 07-10-2012, 01:06 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well my plan was to edit every outgoing email body phrase to add the link What I'm unsure of is how to execute the link permission wise. I'm still a complete noob more or less when it comes to coding.

Sometimes I can take a mod and tweak it (like I did with unsubscribe one), but as far as knowing how to do something from scratch ... well I can't
Reply With Quote
  #10  
Old 07-10-2012, 01:18 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
Well my plan was to edit every outgoing email body phrase to add the link

The problem with that (using my scheme, anyway) is that the user's email address can be in a different variable for each body phrase. I also think that the address would need to be encoded in some way to be part of a url, so that makes it more complicated. There may not be any "good" way (using only hooks) to do what I was thinking about. But I think it's exactly the same problem if you need a way around the user having to log in, no matter how you choose to do it. I suppose to some people it's important enough that it's worth editing one or more of the vb files if necessary.

BTW, I was just wondering - someone else asked about this same problem just yesterday - is that someone else from your site? Or maybe someone having the same problem with the same host.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04790 seconds
  • Memory Usage 2,276KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete