143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says

Is there anybody here that works with vanilla forums? I want to use the vanilla forums authentication outside the forum. Does anybody know how to do this? I have searched the files for examples but no success, i even googled it but even that was without any success.

Hope someone can help me with this.

Greetz Dizcow

3318 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 more
dtbaker Moderator says

so once they authenticate with the forum on your site, you would like to use that authentication in other parts of the site? eg: a members only area.

143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says

Yes correct, with wordpress its easy:

$UID = wp_validate_auth_cookie(); if(empty($UID)){ header("location: http://mainsite.com/"); }else{ $user_info = get_userdata($UID); }

But i cannot find this on vanilla.

3318 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 more
dtbaker Moderator says

Try something along the lines of:

define('APPLICATION', 'Vanilla');
define('APPLICATION_VERSION', '2.0.16');
define('DS', '/');
define('PATH_ROOT', 'path-to-forum');
ob_start();
require_once(PATH_ROOT.DS.'bootstrap.php');
ob_end_clean(); // clear any header output from vanila
$Session = Gdn::Session();
$Authenticator = Gdn::Authenticator();
if ($Session->IsValid()) {
   $Name = $Session->User->Name;
   echo "You are logged in as $Name";
}else{
  echo "You are not logged in";
}

change path-to-forum above.

I’ve just put this on my site, it works from a php script outside of my vanilla forum:

[link]

enjoy!
dave.

143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says

Works perfectly, thank you very much for taking the time to help me with this :)

I can now integrate my account verification for item support.

3318 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 more
dtbaker Moderator says

I can now integrate my account verification for item support.

Feel free to share it when you have it working

143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says

I will absolutely do that, ill keep you in touch ;)

181 posts
  • Has referred 10+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 more
MCStudios says

Is there any way to check if the user is logged in in the vanilla forum using a WordPress page template?

143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says

You can install plug in “php anywhere” if i am correct, then you can use this class to check if user is logged in ;)

http://code.google.com/p/dizcow/downloads/detail?name=vanilla_outdoors_1_0.rar

143 posts
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
+3 more
vanRijswijk says


I can now integrate my account verification for item support.
Feel free to share it when you have it working

Cant share it here, it will be reported every time i do it ;)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by