Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5d852d0a
authored
2010-07-07 19:52:49 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Cleaned up code a bit, added version const
1 parent
bf226ee4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
22 deletions
com/Auth/Auth.php
com/Auth/Facebook/Facebook.php
com/Auth/Auth.php
View file @
5d852d0
...
...
@@ -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
;
}
...
...
com/Auth/Facebook/Facebook.php
View file @
5d852d0
<?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
)));
...
...
Please
register
or
sign in
to post a comment