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.
Toggle Verified Flag by code
xifekobo
New
Hi,
New here. I would like to know how to set the member verified flag by code. I'm doing some subscription on site and thinking of using this instead of creating a new role.
How do you check and toggle verified membership?
thanks.
Tagged:
0
Comments
https://vanillaforums.org/discussion/32312/preventing-posts-from-unverified-members
do you mean verified or confirmed!
verified is just a column in the user table. with 1 and 0 1 is verfied. but it might have nothing to do with what you want.
https://github.com/vanilla/vanilla/search?utf8=✓&q=userverified
here is code
https://github.com/vanilla/vanilla/blob/18498916ac071fd2f9778183c3972764b022154c/applications/dashboard/views/modules/userinfo.php#L38
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
Thank you, yes verified. can I use this outside a custom php file? what do I need to include to make it work?
if you want to do something outside vanilla. you probably need to update the sql database for the proper user ID.
verify is the column in the user table. verified is 1
http://www.w3schools.com/sql/sql_update.asp
if you are within vanilla possibly something like this.
or the json method.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
I prefer to use within vanilla but using a separate file to not mess it up and probably load some headers, kind of like an addon but you don't register it. or maybe just add this on my custom theme php files but I don't know where to place it exactly. thanks
If you stated your exact goal and what you want to appear with a sample screenshot (with intended look) and what you want to do, I'm pretty sure @r_j could guide you through a plugin, he likes that
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
Ok I still have to prepare this as it looks like it's more complicated than it sounds. I appreciate the help River, thanks!