5d852d0a by Chris Boden

Cleaned up code a bit, added version const

1 parent bf226ee4
......@@ -186,9 +186,9 @@ function activate($key) {
$user_site = get_site_option('dashboard_blog', $current_site->blog_id);
add_user_to_blog(($user_site ?: 1), $id, get_site_option('default_user_role', 'subscriber'));
// If use these, fix variables, they're wrong
// add_new_user_to_blog( $id, $user_email, $meta );
// do_action(ACTION_ACTIVATE, $id, $password, $meta);
// If use these, fix variables, they're wrong
//add_new_user_to_blog( $id, $user_email, $meta );
//do_action(ACTION_ACTIVATE, $id, $password, $meta);
return (int)$id;
}
......
<?php
/**
* Note: If there is an inconsistent error
* it's due to how I changed the FB load
* process, may need to change how JS is loaded
* Proabably move FB.init and FB.Event.subscribe
* to my init method
*
* http://wiki.gotenzing.com/groups/tenzing/wiki/aa35a/FB_Connect_in_WP.html
*
* This needs to go in the <html tag
* xmlns:fb="http://www.facebook.com/2008/fbml"
*
* http://wpdev.tenzinghost.com
* API Key: 83f54e078b9aa0e303bba959dc0a566f
* App Secret: e542aca35ab698121fa5917211013a41
* App ID: 105917066126941
*
* http://wp.cb
* API Key: 3bcccfd8c28c52197141266d9e417649
* App Secret: 9bfcd828bc6ccef12336dea57df93ecb
* App ID: 138943536118944
* If you want to use FBML AND pass W3C validation
*
* Graph API Reference:
* http://developers.facebook.com/docs/reference/api/user
......@@ -30,14 +17,12 @@ use Tz\WordPress\Tools\Auth;
use FB;
use Exception;
use Exception, InvalidArgumentException;
use InvalidArgumentException;
const VERSION = 0.2;
const OPTION_NAME = 'tz_auth_fb';
//setcookie('wpfb_logout', '', time() - 3600, '/');
call_user_func(function() {
Vars::$options = new Tools\WP_Option(OPTION_NAME, Array('button_title' => 'Login', 'ext_perms' => Array('email' => 1)));
......