Version Description
- Apple added
- Patreon added
- Google logo fixed
Download this release
Release Info
Developer | ClaudeSchlesser |
Plugin | Social Login |
Version | 5.7 |
Comparing to | |
See all releases |
Code changes from version 5.6 to 5.7
- assets/css/admin.css +19 -7
- assets/img/sprite_35_35.png +0 -0
- includes/admin.php +6 -5
- includes/communication.php +760 -764
- includes/settings.php +7 -1
- oa-social-login.php +2 -2
- readme.txt +61 -136
assets/css/admin.css
CHANGED
@@ -225,15 +225,18 @@
|
|
225 |
}
|
226 |
|
227 |
.oa_social_login_header_links a {
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
233 |
}
|
234 |
|
235 |
.oa_social_login_header_links a:hover {
|
236 |
-
color: rgb(
|
|
|
237 |
}
|
238 |
|
239 |
/* ********************* Tables */
|
@@ -373,6 +376,11 @@
|
|
373 |
}
|
374 |
|
375 |
/* ********************* Provider Icons */
|
|
|
|
|
|
|
|
|
|
|
376 |
.oa_social_login_provider_amazon {
|
377 |
background-position: -1149px -1px;
|
378 |
}
|
@@ -414,7 +422,7 @@
|
|
414 |
}
|
415 |
|
416 |
.oa_social_login_provider_google {
|
417 |
-
background-position: -
|
418 |
}
|
419 |
|
420 |
.oa_social_login_provider_instagram {
|
@@ -453,6 +461,10 @@
|
|
453 |
background-position: -409px -1px;
|
454 |
}
|
455 |
|
|
|
|
|
|
|
|
|
456 |
.oa_social_login_provider_paypal {
|
457 |
background-position: -742px -1px;
|
458 |
}
|
225 |
}
|
226 |
|
227 |
.oa_social_login_header_links a {
|
228 |
+
text-decoration: none;
|
229 |
+
padding: 0 10px;
|
230 |
+
font-size: 14px;
|
231 |
+
color: rgb(75, 138, 75);
|
232 |
+
text-decoration: none;
|
233 |
+
background: rgb(239, 242, 239);
|
234 |
+
padding: 10px 15px;
|
235 |
}
|
236 |
|
237 |
.oa_social_login_header_links a:hover {
|
238 |
+
color: rgb(75, 138, 75);
|
239 |
+
background: rgb(229, 244, 230);
|
240 |
}
|
241 |
|
242 |
/* ********************* Tables */
|
376 |
}
|
377 |
|
378 |
/* ********************* Provider Icons */
|
379 |
+
|
380 |
+
.oa_social_login_provider_apple {
|
381 |
+
background-position: -1741px -1px;
|
382 |
+
}
|
383 |
+
|
384 |
.oa_social_login_provider_amazon {
|
385 |
background-position: -1149px -1px;
|
386 |
}
|
422 |
}
|
423 |
|
424 |
.oa_social_login_provider_google {
|
425 |
+
background-position: -1704px -1px;
|
426 |
}
|
427 |
|
428 |
.oa_social_login_provider_instagram {
|
461 |
background-position: -409px -1px;
|
462 |
}
|
463 |
|
464 |
+
.oa_social_login_provider_patreon {
|
465 |
+
background-position: -1630px -1px;
|
466 |
+
}
|
467 |
+
|
468 |
.oa_social_login_provider_paypal {
|
469 |
background-position: -742px -1px;
|
470 |
}
|
assets/img/sprite_35_35.png
CHANGED
Binary file
|
includes/admin.php
CHANGED
@@ -822,11 +822,12 @@ function oa_display_social_login_setup ()
|
|
822 |
</p>
|
823 |
<p></p>
|
824 |
<p>
|
825 |
-
<?php printf (__ ('To be able to use this plugin
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
<?php
|
|
|
830 |
</p>
|
831 |
<p>
|
832 |
<a class="oa_social_login_btn oa_social_login_btn_success" href="https://app.oneall.com/signup/wp" target="_blank"><?php _e ('Click here to setup your free account', 'oa-social-login'); ?></a>
|
822 |
</p>
|
823 |
<p></p>
|
824 |
<p>
|
825 |
+
<?php printf (__ ('To be able to use this plugin, please take a minute and create a free account at %s. This is absolutely free an takes only a minute or two.', 'oa-social-login'), '<a href="https://app.oneall.com/signup/wp" target="_blank">http://www.oneall.com</a>'); ?><br />
|
826 |
+
<?php printf (__ ('You are in good company! OneAll is used by more than 300,000 websites and mobile apps worldwide including many big brands!')); ?>
|
827 |
+
</p>
|
828 |
+
<p>
|
829 |
+
<?php _e ('After having created your free account and setup a Site, simply enter your Site settings below and setup the plugin to your convenience.', 'oa-social-login'); ?><br />
|
830 |
+
<?php printf (__ ('Do not hesitate to <a target="_blank" href="%s">contact our support staff</a> if you have any questions. We are there to help!', 'oa-social-login'), 'https://app.oneall.com/open-support-ticket/'); ?>
|
831 |
</p>
|
832 |
<p>
|
833 |
<a class="oa_social_login_btn oa_social_login_btn_success" href="https://app.oneall.com/signup/wp" target="_blank"><?php _e ('Click here to setup your free account', 'oa-social-login'); ?></a>
|
includes/communication.php
CHANGED
@@ -1,601 +1,593 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
/**
|
5 |
* Handle the callback
|
6 |
*/
|
7 |
-
function oa_social_login_callback
|
8 |
{
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
else
|
567 |
-
{
|
568 |
-
oa_social_login_log ('Callback failed, HTTP code');
|
569 |
-
}
|
570 |
-
}
|
571 |
-
}
|
572 |
}
|
573 |
|
574 |
-
|
575 |
/**
|
576 |
* Send an API request by using the given handler
|
577 |
*/
|
578 |
-
function oa_social_login_do_api_request
|
579 |
{
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
}
|
600 |
|
601 |
/**
|
@@ -607,159 +599,162 @@ function oa_social_login_do_api_request ($handler, $url, $opts = array (), $time
|
|
607 |
/**
|
608 |
* Check if fsockopen is available.
|
609 |
*/
|
610 |
-
function oa_social_login_check_fsockopen_available
|
611 |
{
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
//Not loaded or disabled
|
626 |
-
return false;
|
627 |
-
}
|
628 |
|
|
|
|
|
|
|
|
|
629 |
|
630 |
/**
|
631 |
* Check if fsockopen is enabled and can be used to connect to OneAll.
|
632 |
*/
|
633 |
-
function oa_social_login_check_fsockopen
|
634 |
{
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
return false;
|
650 |
-
}
|
651 |
|
|
|
|
|
652 |
|
653 |
/**
|
654 |
* Send an fsockopen request.
|
655 |
*/
|
656 |
-
function oa_social_login_fsockopen_request
|
657 |
{
|
658 |
-
|
659 |
-
|
660 |
|
661 |
//Make sure that this is a valid URL
|
662 |
-
if (($uri = parse_url
|
663 |
{
|
664 |
$result->http_error = 'invalid_uri';
|
|
|
665 |
return $result;
|
666 |
}
|
667 |
|
668 |
//Check the scheme
|
669 |
-
if ($uri
|
670 |
{
|
671 |
-
$port = (isset
|
672 |
-
$url = ($uri
|
673 |
$url_protocol = 'https://';
|
674 |
$url_prefix = 'ssl://';
|
675 |
}
|
676 |
else
|
677 |
{
|
678 |
-
$port = (isset
|
679 |
-
$url = ($uri
|
680 |
$url_protocol = 'http://';
|
681 |
$url_prefix = '';
|
682 |
}
|
683 |
|
684 |
//Construct the path to act on
|
685 |
-
$path = (isset
|
686 |
|
687 |
-
|
688 |
$headers = array();
|
689 |
|
690 |
// We are using a proxy
|
691 |
-
if (!
|
692 |
{
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
}
|
714 |
// We are not using a proxy
|
715 |
else
|
716 |
{
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
|
|
730 |
}
|
731 |
|
732 |
//Enable basic authentication
|
733 |
-
if (isset
|
734 |
{
|
735 |
-
|
736 |
}
|
737 |
|
738 |
//Build and send request
|
739 |
-
fwrite
|
740 |
|
741 |
//Fetch response
|
742 |
$response = '';
|
743 |
-
while (!feof
|
744 |
{
|
745 |
-
|
746 |
}
|
747 |
|
748 |
//Close connection
|
749 |
-
fclose
|
750 |
|
751 |
//Parse response
|
752 |
-
list($response_header, $response_body) = explode
|
753 |
|
754 |
//Parse header
|
755 |
-
$response_header = preg_split
|
756 |
-
list($header_protocol, $header_code, $header_status_message) = explode
|
757 |
|
758 |
//Build result
|
759 |
$result->http_code = $header_code;
|
760 |
$result->http_data = $response_body;
|
761 |
|
762 |
//Done
|
|
|
763 |
return $result;
|
764 |
}
|
765 |
|
@@ -772,106 +767,107 @@ function oa_social_login_fsockopen_request ($url, $options = array (), $timeout
|
|
772 |
/**
|
773 |
* Check if cURL has been loaded and is enabled.
|
774 |
*/
|
775 |
-
function oa_social_login_check_curl_available
|
776 |
{
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
//Not loaded or disabled
|
791 |
-
return false;
|
792 |
-
}
|
793 |
|
|
|
|
|
|
|
|
|
794 |
|
795 |
/**
|
796 |
* Check if CURL is available and can be used to connect to OneAll
|
797 |
*/
|
798 |
-
function oa_social_login_check_curl
|
799 |
{
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
return false;
|
815 |
-
}
|
816 |
|
|
|
|
|
817 |
|
818 |
/**
|
819 |
* Send a CURL request.
|
820 |
*/
|
821 |
-
function oa_social_login_curl_request
|
822 |
{
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
|
1 |
<?php
|
2 |
|
|
|
3 |
/**
|
4 |
* Handle the callback
|
5 |
*/
|
6 |
+
function oa_social_login_callback()
|
7 |
{
|
8 |
+
//Callback Handler
|
9 |
+
if (isset($_REQUEST) and !empty($_REQUEST['oa_action']) and $_REQUEST['oa_action'] == 'social_login' and !empty($_REQUEST['connection_token']))
|
10 |
+
{
|
11 |
+
//OneAll Connection token
|
12 |
+
$connection_token = trim($_REQUEST['connection_token']);
|
13 |
+
|
14 |
+
//Read settings
|
15 |
+
$settings = get_option('oa_social_login_settings');
|
16 |
+
|
17 |
+
//API Settings
|
18 |
+
$api_connection_handler = ((!empty($settings['api_connection_handler']) and $settings['api_connection_handler'] == 'fsockopen') ? 'fsockopen' : 'curl');
|
19 |
+
$api_connection_use_https = ((!isset($settings['api_connection_use_https']) or $settings['api_connection_use_https'] == '1') ? true : false);
|
20 |
+
$api_subdomain = (!empty($settings['api_subdomain']) ? trim($settings['api_subdomain']) : '');
|
21 |
+
|
22 |
+
//We cannot make a connection without a subdomain
|
23 |
+
if (!empty($api_subdomain))
|
24 |
+
{
|
25 |
+
//See: http://docs.oneall.com/api/resources/connections/read-connection-details/
|
26 |
+
$api_resource_url = ($api_connection_use_https ? 'https' : 'http') . '://' . $api_subdomain . '.api.oneall.com/connections/' . $connection_token . '.json';
|
27 |
+
|
28 |
+
//API Credentials
|
29 |
+
$api_opts = array();
|
30 |
+
$api_opts['api_key'] = (!empty($settings['api_key']) ? $settings['api_key'] : '');
|
31 |
+
$api_opts['api_secret'] = (!empty($settings['api_secret']) ? $settings['api_secret'] : '');
|
32 |
+
|
33 |
+
//Retrieve connection details
|
34 |
+
$result = oa_social_login_do_api_request($api_connection_handler, $api_resource_url, $api_opts);
|
35 |
+
|
36 |
+
//Check result
|
37 |
+
if (is_object($result) and property_exists($result, 'http_code') and $result->http_code == 200 and property_exists($result, 'http_data'))
|
38 |
+
{
|
39 |
+
// Decode result.
|
40 |
+
$decoded_result = @json_decode($result->http_data);
|
41 |
+
if (is_object($decoded_result) and isset($decoded_result->response->result->data->user))
|
42 |
+
{
|
43 |
+
// User data.
|
44 |
+
$user_data = $decoded_result->response->result->data->user;
|
45 |
+
|
46 |
+
// Social network profile data.
|
47 |
+
$identity = $user_data->identity;
|
48 |
+
|
49 |
+
// Unique user token provided by OneAll.
|
50 |
+
$user_token = apply_filters('oa_social_login_filter_get_user_token', $user_data->user_token);
|
51 |
+
|
52 |
+
// Identity Provider.
|
53 |
+
$user_identity_provider = $identity->source->name;
|
54 |
+
|
55 |
+
// Thumbnail.
|
56 |
+
$user_thumbnail = (!empty($identity->thumbnailUrl) ? trim($identity->thumbnailUrl) : '');
|
57 |
+
|
58 |
+
// Picture.
|
59 |
+
$user_picture = (!empty($identity->pictureUrl) ? trim($identity->pictureUrl) : '');
|
60 |
+
|
61 |
+
// About Me.
|
62 |
+
$user_about_me = (!empty($identity->aboutMe) ? trim($identity->aboutMe) : '');
|
63 |
+
|
64 |
+
// Note.
|
65 |
+
$user_note = (!empty($identity->note) ? trim($identity->note) : '');
|
66 |
+
|
67 |
+
// Firstname.
|
68 |
+
$user_first_name = (!empty($identity->name->givenName) ? $identity->name->givenName : '');
|
69 |
+
|
70 |
+
// Lastname.
|
71 |
+
$user_last_name = (!empty($identity->name->familyName) ? $identity->name->familyName : '');
|
72 |
+
|
73 |
+
// Fullname.
|
74 |
+
if (!empty($identity->name->formatted))
|
75 |
+
{
|
76 |
+
$user_full_name = $identity->name->formatted;
|
77 |
+
}
|
78 |
+
elseif (!empty($identity->name->displayName))
|
79 |
+
{
|
80 |
+
$user_full_name = $identity->name->displayName;
|
81 |
+
}
|
82 |
+
else
|
83 |
+
{
|
84 |
+
$user_full_name = trim($user_first_name . ' ' . $user_last_name);
|
85 |
+
}
|
86 |
+
|
87 |
+
// Email Address.
|
88 |
+
$user_email = '';
|
89 |
+
$user_email_is_verified = false;
|
90 |
+
if (property_exists($identity, 'emails') && is_array($identity->emails))
|
91 |
+
{
|
92 |
+
foreach ($identity->emails as $email)
|
93 |
+
{
|
94 |
+
if ($user_email_is_verified !== true)
|
95 |
+
{
|
96 |
+
$user_email = $email->value;
|
97 |
+
$user_email_is_verified = ($email->is_verified == '1');
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
// Website.
|
103 |
+
$user_website = '';
|
104 |
+
$user_websites = array();
|
105 |
+
|
106 |
+
// Profile URL.
|
107 |
+
if (!empty($identity->profileUrl))
|
108 |
+
{
|
109 |
+
$user_websites[] = trim($identity->profileUrl);
|
110 |
+
}
|
111 |
+
|
112 |
+
// Website URLs.
|
113 |
+
if (isset($identity->urls) && is_array($identity->urls))
|
114 |
+
{
|
115 |
+
foreach ($identity->urls as $identity_url)
|
116 |
+
{
|
117 |
+
if (!empty($identity_url->value))
|
118 |
+
{
|
119 |
+
$user_websites[] = trim($identity_url->value);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
// Do we have any websites?
|
125 |
+
if (count($user_websites) > 0)
|
126 |
+
{
|
127 |
+
// Remove duplcates.
|
128 |
+
$user_websites = array_unique($user_websites);
|
129 |
+
|
130 |
+
// Compute a website to be used.
|
131 |
+
foreach ($user_websites as $value)
|
132 |
+
{
|
133 |
+
if (empty($user_website))
|
134 |
+
{
|
135 |
+
if (!empty($value) && strlen($value) < 100)
|
136 |
+
{
|
137 |
+
$user_website = $value;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
// Preferred Username.
|
144 |
+
if (!empty($identity->preferredUsername))
|
145 |
+
{
|
146 |
+
$user_login = $identity->preferredUsername;
|
147 |
+
}
|
148 |
+
elseif (!empty($identity->displayName))
|
149 |
+
{
|
150 |
+
$user_login = $identity->displayName;
|
151 |
+
}
|
152 |
+
else
|
153 |
+
{
|
154 |
+
$user_login = $user_full_name;
|
155 |
+
}
|
156 |
+
|
157 |
+
// New user created?
|
158 |
+
$new_registration = false;
|
159 |
+
|
160 |
+
// Sanitize Login.
|
161 |
+
$user_login = str_replace('.', '-', $user_login);
|
162 |
+
$user_login = sanitize_user($user_login, true);
|
163 |
+
|
164 |
+
// Get user by token.
|
165 |
+
$user_id = oa_social_login_get_userid_by_token($user_token);
|
166 |
+
|
167 |
+
// Try to link to existing account.
|
168 |
+
if (!is_numeric($user_id))
|
169 |
+
{
|
170 |
+
// This is a new user!
|
171 |
+
$new_registration = true;
|
172 |
+
|
173 |
+
// Linking enabled?
|
174 |
+
if (!isset($settings['plugin_link_verified_accounts']) or $settings['plugin_link_verified_accounts'] == '1')
|
175 |
+
{
|
176 |
+
// Only link if email is verified.
|
177 |
+
if (!empty($user_email) && $user_email_is_verified === true)
|
178 |
+
{
|
179 |
+
// Read existing user.
|
180 |
+
if (($user_id_tmp = email_exists($user_email)) !== false)
|
181 |
+
{
|
182 |
+
$user_data = get_userdata($user_id_tmp);
|
183 |
+
if ($user_data !== false)
|
184 |
+
{
|
185 |
+
$user_id = $user_data->ID;
|
186 |
+
$user_login = $user_data->user_login;
|
187 |
+
|
188 |
+
// Refresh the meta data.
|
189 |
+
delete_metadata('user', null, 'oa_social_login_user_token', $user_token, true);
|
190 |
+
update_user_meta($user_id, 'oa_social_login_user_token', $user_token);
|
191 |
+
update_user_meta($user_id, 'oa_social_login_identity_provider', $user_identity_provider);
|
192 |
+
|
193 |
+
// Refresh the cache.
|
194 |
+
wp_cache_delete($user_id, 'users');
|
195 |
+
wp_cache_delete($user_login, 'userlogins');
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
// New User?
|
203 |
+
if (!is_numeric($user_id))
|
204 |
+
{
|
205 |
+
// Username is mandatory.
|
206 |
+
if (!isset($user_login) or strlen(trim($user_login)) == 0)
|
207 |
+
{
|
208 |
+
$user_login = $user_identity_provider . 'User';
|
209 |
+
}
|
210 |
+
|
211 |
+
// BuddyPress : See bp_core_strip_username_spaces()
|
212 |
+
if (function_exists('bp_core_strip_username_spaces'))
|
213 |
+
{
|
214 |
+
$user_login = str_replace(' ', '-', $user_login);
|
215 |
+
}
|
216 |
+
|
217 |
+
// Username must be unique.
|
218 |
+
if (username_exists($user_login))
|
219 |
+
{
|
220 |
+
$i = 1;
|
221 |
+
$user_login_tmp = $user_login;
|
222 |
+
do
|
223 |
+
{
|
224 |
+
$user_login_tmp = $user_login . ($i++);
|
225 |
+
$user_login_tmp = apply_filters('oa_social_login_filter_new_user_generic_login', $user_login_tmp);
|
226 |
+
} while (username_exists($user_login_tmp));
|
227 |
+
$user_login = $user_login_tmp;
|
228 |
+
}
|
229 |
+
|
230 |
+
// Email Filter.
|
231 |
+
$user_login = apply_filters('oa_social_login_filter_new_user_login', $user_login);
|
232 |
+
|
233 |
+
// Email Filter.
|
234 |
+
$user_email = apply_filters('oa_social_login_filter_new_user_email', $user_email);
|
235 |
+
|
236 |
+
// Email must be unique.
|
237 |
+
$placeholder_email_used = false;
|
238 |
+
if (!is_email($user_email) || email_exists($user_email))
|
239 |
+
{
|
240 |
+
$user_email = oa_social_login_create_rand_email();
|
241 |
+
$user_email = apply_filters('oa_social_login_filter_new_user_random_email', $user_email);
|
242 |
+
$placeholder_email_used = true;
|
243 |
+
}
|
244 |
+
|
245 |
+
// Setup the user's password.
|
246 |
+
$user_pass = wp_generate_password();
|
247 |
+
$user_pass = apply_filters('oa_social_login_filter_new_user_password', $user_pass);
|
248 |
+
|
249 |
+
// Setup the user's role.
|
250 |
+
$user_role = get_option('default_role');
|
251 |
+
$user_role = apply_filters('oa_social_login_filter_new_user_role', $user_role);
|
252 |
+
|
253 |
+
// Setup the name to display.
|
254 |
+
$user_display_name = (!empty($user_full_name) ? $user_full_name : $user_login);
|
255 |
+
|
256 |
+
// Build user data.
|
257 |
+
$user_fields = array(
|
258 |
+
|
259 |
+
// User table.
|
260 |
+
'user_login' => substr($user_login, 0, 60),
|
261 |
+
'user_pass' => $user_pass,
|
262 |
+
'display_name' => substr($user_display_name, 0, 250),
|
263 |
+
'user_email' => substr($user_email, 0, 100),
|
264 |
+
'user_url' => substr($user_website, 0, 100),
|
265 |
+
|
266 |
+
// Meta mable.
|
267 |
+
'first_name' => $user_first_name,
|
268 |
+
'last_name' => $user_last_name,
|
269 |
+
'role' => $user_role
|
270 |
+
);
|
271 |
+
|
272 |
+
// Filter for user_data.
|
273 |
+
$user_fields = apply_filters('oa_social_login_filter_new_user_fields', $user_fields);
|
274 |
+
|
275 |
+
// Hook before adding the user.
|
276 |
+
do_action('oa_social_login_action_before_user_insert', $user_fields, $identity);
|
277 |
+
|
278 |
+
// Create a new user.
|
279 |
+
$user_id = wp_insert_user($user_fields);
|
280 |
+
if (is_numeric($user_id) and ($user_data = get_userdata($user_id)) !== false)
|
281 |
+
{
|
282 |
+
// Refresh the meta-data.
|
283 |
+
delete_metadata('user', null, 'oa_social_login_user_token', $user_token, true);
|
284 |
+
|
285 |
+
// Save the OneAll meta-data.
|
286 |
+
update_user_meta($user_id, 'oa_social_login_user_token', $user_token);
|
287 |
+
update_user_meta($user_id, 'oa_social_login_identity_provider', $user_identity_provider);
|
288 |
+
|
289 |
+
// Save the WordPress meta-data.
|
290 |
+
if (!empty($user_about_me) or !empty($user_note))
|
291 |
+
{
|
292 |
+
$user_description = (!empty($user_about_me) ? $user_about_me : $user_note);
|
293 |
+
update_user_meta($user_id, 'description', $user_description);
|
294 |
+
}
|
295 |
+
|
296 |
+
// Email is required.
|
297 |
+
if (!empty($settings['plugin_require_email']))
|
298 |
+
{
|
299 |
+
//We don't have the real email
|
300 |
+
if ($placeholder_email_used)
|
301 |
+
{
|
302 |
+
update_user_meta($user_id, 'oa_social_login_request_email', 1);
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
// Notify Administrator.
|
307 |
+
if (!empty($settings['plugin_notify_admin']))
|
308 |
+
{
|
309 |
+
oa_social_login_user_notification($user_id, $user_identity_provider);
|
310 |
+
}
|
311 |
+
|
312 |
+
// Refresh the cache.
|
313 |
+
wp_cache_delete($user_id, 'users');
|
314 |
+
wp_cache_delete($user_login, 'userlogins');
|
315 |
+
|
316 |
+
// Native WordPress hook.
|
317 |
+
do_action('user_register', $user_id);
|
318 |
+
|
319 |
+
// Social Login Hook.
|
320 |
+
do_action('oa_social_login_action_after_user_insert', $user_data, $identity);
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
// Sucess.
|
325 |
+
$user_data = get_userdata($user_id);
|
326 |
+
if ($user_data !== false)
|
327 |
+
{
|
328 |
+
// Hooks to be used by third parties.
|
329 |
+
do_action('oa_social_login_action_before_user_login', $user_data, $identity, $new_registration);
|
330 |
+
|
331 |
+
// Update user thumbnail.
|
332 |
+
if (!empty($user_thumbnail))
|
333 |
+
{
|
334 |
+
update_user_meta($user_id, 'oa_social_login_user_thumbnail', $user_thumbnail);
|
335 |
+
}
|
336 |
+
|
337 |
+
// Update user picture.
|
338 |
+
if (!empty($user_picture))
|
339 |
+
{
|
340 |
+
update_user_meta($user_id, 'oa_social_login_user_picture', $user_picture);
|
341 |
+
}
|
342 |
+
|
343 |
+
// Set the cookie and login.
|
344 |
+
wp_clear_auth_cookie();
|
345 |
+
wp_set_auth_cookie($user_data->ID, true);
|
346 |
+
do_action('wp_login', $user_data->user_login, $user_data);
|
347 |
+
|
348 |
+
// Where did the user come from?
|
349 |
+
$oa_social_login_source = (!empty($_REQUEST['oa_social_login_source']) ? strtolower(trim($_REQUEST['oa_social_login_source'])) : '');
|
350 |
+
|
351 |
+
// Use safe redirection?
|
352 |
+
$redirect_to_safe = false;
|
353 |
+
|
354 |
+
// Build the url to redirect the user to.
|
355 |
+
switch ($oa_social_login_source)
|
356 |
+
{
|
357 |
+
//*************** Registration ***************
|
358 |
+
case 'registration':
|
359 |
+
// Default redirection.
|
360 |
+
$redirect_to = admin_url();
|
361 |
+
|
362 |
+
// Redirection in URL.
|
363 |
+
if (!empty($_GET['redirect_to']))
|
364 |
+
{
|
365 |
+
$redirect_to = $_GET['redirect_to'];
|
366 |
+
$redirect_to_safe = true;
|
367 |
+
}
|
368 |
+
else
|
369 |
+
{
|
370 |
+
// Redirection customized.
|
371 |
+
if (isset($settings['plugin_registration_form_redirect']))
|
372 |
+
{
|
373 |
+
switch (strtolower($settings['plugin_registration_form_redirect']))
|
374 |
+
{
|
375 |
+
// Current.
|
376 |
+
case 'current':
|
377 |
+
$redirect_to = oa_social_login_get_current_url();
|
378 |
+
break;
|
379 |
+
|
380 |
+
// Homepage.
|
381 |
+
case 'homepage':
|
382 |
+
$redirect_to = home_url();
|
383 |
+
break;
|
384 |
+
|
385 |
+
// Custom.
|
386 |
+
case 'custom':
|
387 |
+
if (isset($settings['plugin_registration_form_redirect_custom_url']) and strlen(trim($settings['plugin_registration_form_redirect_custom_url'])) > 0)
|
388 |
+
{
|
389 |
+
$redirect_to = trim($settings['plugin_registration_form_redirect_custom_url']);
|
390 |
+
}
|
391 |
+
break;
|
392 |
+
|
393 |
+
// Default/Dashboard.
|
394 |
+
default:
|
395 |
+
case 'dashboard':
|
396 |
+
$redirect_to = admin_url();
|
397 |
+
break;
|
398 |
+
}
|
399 |
+
}
|
400 |
+
}
|
401 |
+
break;
|
402 |
+
|
403 |
+
//*************** Login ***************
|
404 |
+
case 'login':
|
405 |
+
// Default redirection.
|
406 |
+
$redirect_to = home_url();
|
407 |
+
|
408 |
+
// Redirection in URL.
|
409 |
+
if (!empty($_GET['redirect_to']))
|
410 |
+
{
|
411 |
+
$redirect_to = $_GET['redirect_to'];
|
412 |
+
$redirect_to_safe = true;
|
413 |
+
}
|
414 |
+
else
|
415 |
+
{
|
416 |
+
// Redirection customized.
|
417 |
+
if (isset($settings['plugin_login_form_redirect']))
|
418 |
+
{
|
419 |
+
switch (strtolower($settings['plugin_login_form_redirect']))
|
420 |
+
{
|
421 |
+
// Current.
|
422 |
+
case 'current':
|
423 |
+
global $pagenow;
|
424 |
+
|
425 |
+
// Do not redirect to the login page as this would logout the user.
|
426 |
+
if (empty($pagenow) or $pagenow != 'wp-login.php')
|
427 |
+
{
|
428 |
+
$redirect_to = oa_social_login_get_current_url();
|
429 |
+
}
|
430 |
+
// In this case just go to the homepage.
|
431 |
+
else
|
432 |
+
{
|
433 |
+
$redirect_to = home_url();
|
434 |
+
}
|
435 |
+
break;
|
436 |
+
|
437 |
+
// Dashboard.
|
438 |
+
case 'dashboard':
|
439 |
+
$redirect_to = admin_url();
|
440 |
+
break;
|
441 |
+
|
442 |
+
// Custom.
|
443 |
+
case 'custom':
|
444 |
+
if (isset($settings['plugin_login_form_redirect_custom_url']) and strlen(trim($settings['plugin_login_form_redirect_custom_url'])) > 0)
|
445 |
+
{
|
446 |
+
$redirect_to = trim($settings['plugin_login_form_redirect_custom_url']);
|
447 |
+
}
|
448 |
+
break;
|
449 |
+
|
450 |
+
// Default/Homepage.
|
451 |
+
default:
|
452 |
+
case 'homepage':
|
453 |
+
$redirect_to = home_url();
|
454 |
+
break;
|
455 |
+
}
|
456 |
+
}
|
457 |
+
}
|
458 |
+
break;
|
459 |
+
|
460 |
+
// *************** Comments ***************
|
461 |
+
case 'comments':
|
462 |
+
$redirect_to = oa_social_login_get_current_url() . '#comments';
|
463 |
+
break;
|
464 |
+
|
465 |
+
//*************** Widget/Shortcode ***************
|
466 |
+
default:
|
467 |
+
case 'widget':
|
468 |
+
case 'shortcode':
|
469 |
+
|
470 |
+
// Is this is a new user?
|
471 |
+
$opt_key = ($new_registration === true ? 'register' : 'login');
|
472 |
+
|
473 |
+
// Default redirection.
|
474 |
+
$redirect_to = oa_social_login_get_current_url();
|
475 |
+
|
476 |
+
// Redirection customized.
|
477 |
+
if (isset($settings['plugin_shortcode_' . $opt_key . '_redirect']))
|
478 |
+
{
|
479 |
+
switch (strtolower($settings['plugin_shortcode_' . $opt_key . '_redirect']))
|
480 |
+
{
|
481 |
+
// Current.
|
482 |
+
case 'current':
|
483 |
+
$redirect_to = oa_social_login_get_current_url();
|
484 |
+
break;
|
485 |
+
|
486 |
+
// Homepage.
|
487 |
+
case 'homepage':
|
488 |
+
$redirect_to = home_url();
|
489 |
+
break;
|
490 |
+
|
491 |
+
// Dashboard.
|
492 |
+
case 'dashboard':
|
493 |
+
$redirect_to = admin_url();
|
494 |
+
break;
|
495 |
+
|
496 |
+
// Custom.
|
497 |
+
case 'custom':
|
498 |
+
if (isset($settings['plugin_shortcode_' . $opt_key . '_redirect_url']) and strlen(trim($settings['plugin_shortcode_' . $opt_key . '_redirect_url'])) > 0)
|
499 |
+
{
|
500 |
+
$redirect_to = trim($settings['plugin_shortcode_' . $opt_key . '_redirect_url']);
|
501 |
+
}
|
502 |
+
break;
|
503 |
+
}
|
504 |
+
}
|
505 |
+
break;
|
506 |
+
}
|
507 |
+
|
508 |
+
// Check if url set.
|
509 |
+
if (!isset($redirect_to) or strlen(trim($redirect_to)) == 0)
|
510 |
+
{
|
511 |
+
$redirect_to = home_url();
|
512 |
+
}
|
513 |
+
|
514 |
+
// New User -> Registration.
|
515 |
+
if ($new_registration === true)
|
516 |
+
{
|
517 |
+
// Apply the WordPress filters.
|
518 |
+
if (empty($settings['plugin_protect_registration_redirect_url']))
|
519 |
+
{
|
520 |
+
$redirect_to = apply_filters('registration_redirect', $redirect_to);
|
521 |
+
}
|
522 |
+
|
523 |
+
// Apply our filters.
|
524 |
+
$redirect_to = apply_filters('oa_social_login_filter_registration_redirect_url', $redirect_to, $user_data);
|
525 |
+
}
|
526 |
+
// Existing User -> Login.
|
527 |
+
else
|
528 |
+
{
|
529 |
+
// Apply the WordPress filters.
|
530 |
+
if (empty($settings['plugin_protect_login_redirect_url']))
|
531 |
+
{
|
532 |
+
$redirect_to = apply_filters('login_redirect', $redirect_to, (!empty($_GET['redirect_to']) ? $_GET['redirect_to'] : ''), $user_data);
|
533 |
+
}
|
534 |
+
|
535 |
+
// Apply our filters.
|
536 |
+
$redirect_to = apply_filters('oa_social_login_filter_login_redirect_url', $redirect_to, $user_data);
|
537 |
+
}
|
538 |
+
|
539 |
+
// Hooks for other plugins.
|
540 |
+
do_action('oa_social_login_action_before_user_redirect', $user_data, $identity, $redirect_to);
|
541 |
+
|
542 |
+
// Use safe redirection?
|
543 |
+
if ($redirect_to_safe === true)
|
544 |
+
{
|
545 |
+
wp_safe_redirect($redirect_to);
|
546 |
+
}
|
547 |
+
else
|
548 |
+
{
|
549 |
+
wp_redirect($redirect_to);
|
550 |
+
}
|
551 |
+
exit();
|
552 |
+
}
|
553 |
+
}
|
554 |
+
else
|
555 |
+
{
|
556 |
+
oa_social_login_log('Callback failed, invalid data ' . $result->http_code);
|
557 |
+
}
|
558 |
+
}
|
559 |
+
else
|
560 |
+
{
|
561 |
+
oa_social_login_log('Callback failed, HTTP code');
|
562 |
+
}
|
563 |
+
}
|
564 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
|
|
|
567 |
/**
|
568 |
* Send an API request by using the given handler
|
569 |
*/
|
570 |
+
function oa_social_login_do_api_request($handler, $url, $opts = array(), $timeout = 25)
|
571 |
{
|
572 |
+
// Proxy Settings
|
573 |
+
if (defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT'))
|
574 |
+
{
|
575 |
+
$opts['proxy_url'] = (defined('WP_PROXY_HOST') ? WP_PROXY_HOST : '');
|
576 |
+
$opts['proxy_port'] = (defined('WP_PROXY_PORT') ? WP_PROXY_PORT : '');
|
577 |
+
$opts['proxy_username'] = (defined('WP_PROXY_USERNAME') ? WP_PROXY_USERNAME : '');
|
578 |
+
$opts['proxy_password'] = (defined('WP_PROXY_PASSWORD') ? WP_PROXY_PASSWORD : '');
|
579 |
+
}
|
580 |
+
|
581 |
+
//FSOCKOPEN
|
582 |
+
if ($handler == 'fsockopen')
|
583 |
+
{
|
584 |
+
return oa_social_login_fsockopen_request($url, $opts, $timeout);
|
585 |
+
}
|
586 |
+
//CURL
|
587 |
+
else
|
588 |
+
{
|
589 |
+
return oa_social_login_curl_request($url, $opts, $timeout);
|
590 |
+
}
|
591 |
}
|
592 |
|
593 |
/**
|
599 |
/**
|
600 |
* Check if fsockopen is available.
|
601 |
*/
|
602 |
+
function oa_social_login_check_fsockopen_available()
|
603 |
{
|
604 |
+
//Make sure fsockopen has been loaded
|
605 |
+
if (function_exists('fsockopen') and function_exists('fwrite'))
|
606 |
+
{
|
607 |
+
$disabled_functions = oa_social_login_get_disabled_functions();
|
608 |
+
|
609 |
+
//Make sure fsockopen has not been disabled
|
610 |
+
if (!in_array('fsockopen', $disabled_functions) and !in_array('fwrite', $disabled_functions))
|
611 |
+
{
|
612 |
+
//Loaded and enabled
|
613 |
+
return true;
|
614 |
+
}
|
615 |
+
}
|
|
|
|
|
|
|
|
|
616 |
|
617 |
+
//Not loaded or disabled
|
618 |
+
|
619 |
+
return false;
|
620 |
+
}
|
621 |
|
622 |
/**
|
623 |
* Check if fsockopen is enabled and can be used to connect to OneAll.
|
624 |
*/
|
625 |
+
function oa_social_login_check_fsockopen($secure = true)
|
626 |
{
|
627 |
+
if (oa_social_login_check_fsockopen_available())
|
628 |
+
{
|
629 |
+
$result = oa_social_login_do_api_request('fsockopen', ($secure ? 'https' : 'http') . '://www.oneall.com/ping.html');
|
630 |
+
if (is_object($result) and property_exists($result, 'http_code') and $result->http_code == 200)
|
631 |
+
{
|
632 |
+
if (property_exists($result, 'http_data'))
|
633 |
+
{
|
634 |
+
if (strtolower($result->http_data) == 'ok')
|
635 |
+
{
|
636 |
+
return true;
|
637 |
+
}
|
638 |
+
}
|
639 |
+
}
|
640 |
+
}
|
|
|
|
|
641 |
|
642 |
+
return false;
|
643 |
+
}
|
644 |
|
645 |
/**
|
646 |
* Send an fsockopen request.
|
647 |
*/
|
648 |
+
function oa_social_login_fsockopen_request($url, $options = array(), $timeout = 15)
|
649 |
{
|
650 |
+
//Store the result
|
651 |
+
$result = new stdClass();
|
652 |
|
653 |
//Make sure that this is a valid URL
|
654 |
+
if (($uri = parse_url($url)) === false)
|
655 |
{
|
656 |
$result->http_error = 'invalid_uri';
|
657 |
+
|
658 |
return $result;
|
659 |
}
|
660 |
|
661 |
//Check the scheme
|
662 |
+
if ($uri['scheme'] == 'https')
|
663 |
{
|
664 |
+
$port = (isset($uri['port']) ? $uri['port'] : 443);
|
665 |
+
$url = ($uri['host'] . ($port != 443 ? ':' . $port : ''));
|
666 |
$url_protocol = 'https://';
|
667 |
$url_prefix = 'ssl://';
|
668 |
}
|
669 |
else
|
670 |
{
|
671 |
+
$port = (isset($uri['port']) ? $uri['port'] : 80);
|
672 |
+
$url = ($uri['host'] . ($port != 80 ? ':' . $port : ''));
|
673 |
$url_protocol = 'http://';
|
674 |
$url_prefix = '';
|
675 |
}
|
676 |
|
677 |
//Construct the path to act on
|
678 |
+
$path = (isset($uri['path']) ? $uri['path'] : '/') . (!empty($uri['query']) ? ('?' . $uri['query']) : '');
|
679 |
|
680 |
+
//HTTP Headers
|
681 |
$headers = array();
|
682 |
|
683 |
// We are using a proxy
|
684 |
+
if (!empty($options['proxy_url']) && !empty($options['proxy_port']))
|
685 |
{
|
686 |
+
// Open Socket
|
687 |
+
$fp = @fsockopen($options['proxy_url'], $options['proxy_port'], $errno, $errstr, $timeout);
|
688 |
+
|
689 |
+
//Make sure that the socket has been opened properly
|
690 |
+
if (!$fp)
|
691 |
+
{
|
692 |
+
$result->http_error = trim($errstr);
|
693 |
+
|
694 |
+
return $result;
|
695 |
+
}
|
696 |
+
|
697 |
+
// HTTP Headers
|
698 |
+
$headers[] = "GET " . $url_protocol . $url . $path . " HTTP/1.0";
|
699 |
+
$headers[] = "Host: " . $url . ":" . $port;
|
700 |
+
|
701 |
+
// Proxy Authentication
|
702 |
+
if (!empty($options['proxy_username']) && !empty($options['proxy_password']))
|
703 |
+
{
|
704 |
+
$headers[] = 'Proxy-Authorization: Basic ' . base64_encode($options['proxy_username'] . ":" . $options['proxy_password']);
|
705 |
+
}
|
706 |
}
|
707 |
// We are not using a proxy
|
708 |
else
|
709 |
{
|
710 |
+
// Open Socket
|
711 |
+
$fp = @fsockopen($url_prefix . $url, $port, $errno, $errstr, $timeout);
|
712 |
+
|
713 |
+
//Make sure that the socket has been opened properly
|
714 |
+
if (!$fp)
|
715 |
+
{
|
716 |
+
$result->http_error = trim($errstr);
|
717 |
+
|
718 |
+
return $result;
|
719 |
+
}
|
720 |
+
|
721 |
+
// HTTP Headers
|
722 |
+
$headers[] = "GET " . $path . " HTTP/1.0";
|
723 |
+
$headers[] = "Host: " . $url;
|
724 |
}
|
725 |
|
726 |
//Enable basic authentication
|
727 |
+
if (isset($options['api_key']) and isset($options['api_secret']))
|
728 |
{
|
729 |
+
$headers[] = 'Authorization: Basic ' . base64_encode($options['api_key'] . ":" . $options['api_secret']);
|
730 |
}
|
731 |
|
732 |
//Build and send request
|
733 |
+
fwrite($fp, (implode("\r\n", $headers) . "\r\n\r\n"));
|
734 |
|
735 |
//Fetch response
|
736 |
$response = '';
|
737 |
+
while (!feof($fp))
|
738 |
{
|
739 |
+
$response .= fread($fp, 1024);
|
740 |
}
|
741 |
|
742 |
//Close connection
|
743 |
+
fclose($fp);
|
744 |
|
745 |
//Parse response
|
746 |
+
list($response_header, $response_body) = explode("\r\n\r\n", $response, 2);
|
747 |
|
748 |
//Parse header
|
749 |
+
$response_header = preg_split("/\r\n|\n|\r/", $response_header);
|
750 |
+
list($header_protocol, $header_code, $header_status_message) = explode(' ', trim(array_shift($response_header)), 3);
|
751 |
|
752 |
//Build result
|
753 |
$result->http_code = $header_code;
|
754 |
$result->http_data = $response_body;
|
755 |
|
756 |
//Done
|
757 |
+
|
758 |
return $result;
|
759 |
}
|
760 |
|
767 |
/**
|
768 |
* Check if cURL has been loaded and is enabled.
|
769 |
*/
|
770 |
+
function oa_social_login_check_curl_available()
|
771 |
{
|
772 |
+
//Make sure cURL has been loaded
|
773 |
+
if (in_array('curl', get_loaded_extensions()) and function_exists('curl_init') and function_exists('curl_exec'))
|
774 |
+
{
|
775 |
+
$disabled_functions = oa_social_login_get_disabled_functions();
|
776 |
+
|
777 |
+
//Make sure cURL not been disabled
|
778 |
+
if (!in_array('curl_init', $disabled_functions) and !in_array('curl_exec', $disabled_functions))
|
779 |
+
{
|
780 |
+
//Loaded and enabled
|
781 |
+
return true;
|
782 |
+
}
|
783 |
+
}
|
|
|
|
|
|
|
|
|
784 |
|
785 |
+
//Not loaded or disabled
|
786 |
+
|
787 |
+
return false;
|
788 |
+
}
|
789 |
|
790 |
/**
|
791 |
* Check if CURL is available and can be used to connect to OneAll
|
792 |
*/
|
793 |
+
function oa_social_login_check_curl($secure = true)
|
794 |
{
|
795 |
+
if (oa_social_login_check_curl_available())
|
796 |
+
{
|
797 |
+
$result = oa_social_login_do_api_request('curl', ($secure ? 'https' : 'http') . '://www.oneall.com/ping.html');
|
798 |
+
if (is_object($result) and property_exists($result, 'http_code') and $result->http_code == 200)
|
799 |
+
{
|
800 |
+
if (property_exists($result, 'http_data'))
|
801 |
+
{
|
802 |
+
if (strtolower($result->http_data) == 'ok')
|
803 |
+
{
|
804 |
+
return true;
|
805 |
+
}
|
806 |
+
}
|
807 |
+
}
|
808 |
+
}
|
|
|
|
|
809 |
|
810 |
+
return false;
|
811 |
+
}
|
812 |
|
813 |
/**
|
814 |
* Send a CURL request.
|
815 |
*/
|
816 |
+
function oa_social_login_curl_request($url, $options = array(), $timeout = 15)
|
817 |
{
|
818 |
+
//Store the result
|
819 |
+
$result = new stdClass();
|
820 |
+
|
821 |
+
//Send request
|
822 |
+
$curl = curl_init();
|
823 |
+
curl_setopt($curl, CURLOPT_URL, $url);
|
824 |
+
curl_setopt($curl, CURLOPT_HEADER, 0);
|
825 |
+
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
|
826 |
+
curl_setopt($curl, CURLOPT_VERBOSE, 0);
|
827 |
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
828 |
+
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
829 |
+
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
830 |
+
curl_setopt($curl, CURLOPT_USERAGENT, 'SocialLogin/' . OA_SOCIAL_LOGIN_VERSION . ' WordPress/' . oa_social_login_get_wp_version() . ' (+http://www.oneall.com/)');
|
831 |
+
|
832 |
+
// BASIC AUTH?
|
833 |
+
if (isset($options['api_key']) and isset($options['api_secret']))
|
834 |
+
{
|
835 |
+
curl_setopt($curl, CURLOPT_USERPWD, $options['api_key'] . ":" . $options['api_secret']);
|
836 |
+
}
|
837 |
+
|
838 |
+
// Proxy Settings
|
839 |
+
if (!empty($options['proxy_url']) && !empty($options['proxy_port']))
|
840 |
+
{
|
841 |
+
// Proxy Location
|
842 |
+
curl_setopt($curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
|
843 |
+
curl_setopt($curl, CURLOPT_PROXY, $options['proxy_url']);
|
844 |
+
|
845 |
+
// Proxy Port
|
846 |
+
curl_setopt($curl, CURLOPT_PROXYPORT, $options['proxy_port']);
|
847 |
+
|
848 |
+
// Proxy Authentication
|
849 |
+
if (!empty($options['proxy_username']) && !empty($options['proxy_password']))
|
850 |
+
{
|
851 |
+
curl_setopt($curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
|
852 |
+
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $options['proxy_username'] . ':' . $options['proxy_password']);
|
853 |
+
}
|
854 |
+
}
|
855 |
+
|
856 |
+
//Make request
|
857 |
+
if (($http_data = curl_exec($curl)) !== false)
|
858 |
+
{
|
859 |
+
$result->http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
860 |
+
$result->http_data = $http_data;
|
861 |
+
$result->http_error = null;
|
862 |
+
}
|
863 |
+
else
|
864 |
+
{
|
865 |
+
$result->http_code = -1;
|
866 |
+
$result->http_data = null;
|
867 |
+
$result->http_error = curl_error($curl);
|
868 |
+
}
|
869 |
+
|
870 |
+
//Done
|
871 |
+
|
872 |
+
return $result;
|
873 |
+
}
|
includes/settings.php
CHANGED
@@ -7,6 +7,9 @@ $oa_social_login_providers = array(
|
|
7 |
'amazon' => array(
|
8 |
'name' => 'Amazon'
|
9 |
),
|
|
|
|
|
|
|
10 |
'battlenet' => array(
|
11 |
'name' => 'Battle.net'
|
12 |
),
|
@@ -33,7 +36,7 @@ $oa_social_login_providers = array(
|
|
33 |
'name' => 'Foursquare'
|
34 |
),
|
35 |
'github' => array(
|
36 |
-
'name' => 'Github.com'
|
37 |
),
|
38 |
'google' => array(
|
39 |
'name' => 'Google',
|
@@ -67,6 +70,9 @@ $oa_social_login_providers = array(
|
|
67 |
'openid' => array(
|
68 |
'name' => 'OpenID'
|
69 |
),
|
|
|
|
|
|
|
70 |
'paypal' => array(
|
71 |
'name' => 'PayPal'
|
72 |
),
|
7 |
'amazon' => array(
|
8 |
'name' => 'Amazon'
|
9 |
),
|
10 |
+
'apple' => array(
|
11 |
+
'name' => 'Apple'
|
12 |
+
),
|
13 |
'battlenet' => array(
|
14 |
'name' => 'Battle.net'
|
15 |
),
|
36 |
'name' => 'Foursquare'
|
37 |
),
|
38 |
'github' => array(
|
39 |
+
'name' => 'Github.com'
|
40 |
),
|
41 |
'google' => array(
|
42 |
'name' => 'Google',
|
70 |
'openid' => array(
|
71 |
'name' => 'OpenID'
|
72 |
),
|
73 |
+
'patreon' => array(
|
74 |
+
'name' => 'Patreon'
|
75 |
+
),
|
76 |
'paypal' => array(
|
77 |
'name' => 'PayPal'
|
78 |
),
|
oa-social-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Social Login
|
4 |
* Plugin URI: http://www.oneall.com/
|
5 |
* Description: Social Login allows your users to <strong>comment, login and register with 40+ social networks</strong> like Twitter, Facebook, LinkedIn, Instagram, Вконтакте, Google or Yahoo.
|
6 |
-
* Version: 5.
|
7 |
* Author: OneAll Social Login <support@oneall.com>
|
8 |
* Author URI: https://www.oneall.com/services/social-network-integration/social-login/
|
9 |
* License: GPL2
|
@@ -12,7 +12,7 @@
|
|
12 |
|
13 |
define ('OA_SOCIAL_LOGIN_PLUGIN_URL', plugins_url () . '/' . basename (dirname (__FILE__)));
|
14 |
define ('OA_SOCIAL_LOGIN_BASE_PATH', dirname (plugin_basename (__FILE__)));
|
15 |
-
define ('OA_SOCIAL_LOGIN_VERSION', '5.
|
16 |
define ('OA_SOCIAL_LOGIN_DEFAULT_THEME', 1);
|
17 |
|
18 |
/**
|
3 |
* Plugin Name: Social Login
|
4 |
* Plugin URI: http://www.oneall.com/
|
5 |
* Description: Social Login allows your users to <strong>comment, login and register with 40+ social networks</strong> like Twitter, Facebook, LinkedIn, Instagram, Вконтакте, Google or Yahoo.
|
6 |
+
* Version: 5.7
|
7 |
* Author: OneAll Social Login <support@oneall.com>
|
8 |
* Author URI: https://www.oneall.com/services/social-network-integration/social-login/
|
9 |
* License: GPL2
|
12 |
|
13 |
define ('OA_SOCIAL_LOGIN_PLUGIN_URL', plugins_url () . '/' . basename (dirname (__FILE__)));
|
14 |
define ('OA_SOCIAL_LOGIN_BASE_PATH', dirname (plugin_basename (__FILE__)));
|
15 |
+
define ('OA_SOCIAL_LOGIN_VERSION', '5.7');
|
16 |
define ('OA_SOCIAL_LOGIN_DEFAULT_THEME', 1);
|
17 |
|
18 |
/**
|
readme.txt
CHANGED
@@ -1,55 +1,62 @@
|
|
1 |
-
=== Social Login & Register for Wordpress - 40+ Social Networks
|
2 |
Contributors: OneAll.com, ClaudeSchlesser, socialloginoneall
|
3 |
-
Tags: social login, social plugin, facebook, facebook login, twitter, google login, twitter login, google, linkedin
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 5.
|
7 |
Requires PHP: 5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
= Social Login
|
16 |
|
17 |
-
|
18 |
|
19 |
**Data Protection Guarantee**<br />
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
**Seamless Integration**<br />
|
23 |
-
|
|
|
|
|
24 |
|
25 |
**Eliminates Spam and Bot Registrations**<br />
|
26 |
-
Get rid of long and complicated forms, improve your data quality and instantly eliminate spam and bot registrations.
|
|
|
|
|
27 |
|
28 |
**Maintenance Free**<br />
|
29 |
-
Do not take the risk of losing any users or customers due to outdated social network integrations. Unlike other
|
30 |
|
31 |
By using OneAll you can be sure that your social media integration will always run smoothly and with the most up-to-date calls.
|
32 |
|
33 |
**Fully Customizable**<br />
|
34 |
-
|
35 |
-
|
|
|
36 |
* On the login page
|
37 |
* On the registration page
|
38 |
-
*
|
39 |
-
*
|
40 |
|
41 |
**Fully Compatible With Other Plugins**<br />
|
42 |
-
|
43 |
-
like per example BuddyPress or WooCommerce amongst others.
|
44 |
|
45 |
**Data Export**<br />
|
46 |
Easily export your users or automatically push data of users that login using Social Login to Mailchimp or Campaign Monitor.
|
47 |
-
This feature is available in the premium version of Social Login and can be enabled in your OneAll account.
|
48 |
|
49 |
|
50 |
**40+ Social Networks**
|
51 |
|
52 |
* Amazon
|
|
|
53 |
* Battle.net
|
54 |
* Blogger
|
55 |
* Discord
|
@@ -69,6 +76,7 @@ This feature is available in the premium version of Social Login and can be enab
|
|
69 |
* Mixer
|
70 |
* Odnoklassniki
|
71 |
* OpenID
|
|
|
72 |
* PayPal
|
73 |
* Pinterest
|
74 |
* PixelPin
|
@@ -89,34 +97,32 @@ This feature is available in the premium version of Social Login and can be enab
|
|
89 |
* Yahoo
|
90 |
* YouTube
|
91 |
|
92 |
-
**
|
93 |
|
94 |
* **GDPR compliant**
|
95 |
-
* **Social Link** – Users can
|
96 |
-
* **Woocommerce Connect** – Automatic integration
|
97 |
* **Woocommerce Profile** – Fill the user's billing address with the first name, last name and email address received from the social network.
|
98 |
-
* **BuddyPress Connect** - Automatic integration of the
|
99 |
* **BuddyPress Profile** - Use the social network avatar as BuddyPress avatar and fill out custom fields.
|
100 |
* **User Insights** - Access the analytics dashboard to discover which social networks your users prefer.
|
101 |
-
* **Automatic Emails** - Send emails to users that register
|
102 |
-
* **Automatic Notifications** - Send notifications to admins for
|
103 |
-
* **Comment Approval** - Automatically approve comments left by users
|
104 |
-
* **Email Retrieval** - Ask users to enter their email when social
|
105 |
-
* **
|
106 |
-
* **Integrated Widget** - Simply use the social login widget to display the icons wherever you want.
|
107 |
* **ShortCodes** - Easily embed social login anywhere by using the available shortcodes.
|
108 |
-
* **Hook** - Customize the
|
109 |
-
* **Icon Themes** - Choose amongst three different
|
110 |
-
* **Documentation** - Access a [complete documentation](https://docs.oneall.com/plugins/guide/social-login-wordpress/) on the available
|
111 |
-
* **Support** - Any questions about Social Login? Our support team is there to assist you.
|
112 |
|
113 |
|
114 |
-
**
|
115 |
|
116 |
-
* **Authentication Filters** - Use customisable filters to restrict which users may login
|
117 |
-
* **Data Export** - Automatically export
|
118 |
-
* **User Insights** - Access analytics and get demographic information about your
|
119 |
-
* **Icon Themes** - Choose amongst twenty different
|
120 |
|
121 |
|
122 |
**Professionally Developed and Maintained**
|
@@ -136,30 +142,29 @@ The OneAll API unifies 40+ Social Networks and consolidates the most powerful so
|
|
136 |
4. Click on the **Autodetect** and **Verify** buttons to make sure that the API connection is working properly.
|
137 |
|
138 |
= API Connection =
|
139 |
-
The social network APIs are constantly changing and being updated. We monitor these changes and automatically update our APIs, so that you can be sure that
|
140 |
|
141 |
In order to enable the plugin you must connect with the OneAll API and create a free account at [OneAll](https://app.oneall.com).
|
142 |
|
143 |
-
More information is available in our [
|
144 |
|
145 |
== Frequently Asked Questions ==
|
146 |
|
147 |
= Do I have to add template tags to my theme? =
|
148 |
|
149 |
You should not have to change your templates.
|
150 |
-
The
|
151 |
|
152 |
= Can Social Login be embedded through a shortcode? =
|
153 |
|
154 |
-
The
|
155 |
The shortcode will automatically be replaced by the icons of the social networks that you have
|
156 |
-
enabled in the
|
157 |
|
158 |
= I have a custom template and the plugin is not displayed correctly =
|
159 |
|
160 |
-
|
161 |
-
you can add
|
162 |
-
in your template (at the location where it should be displayed, i.e. above the comments).
|
163 |
|
164 |
`<?php do_action('oa_social_login'); ?>`
|
165 |
|
@@ -174,8 +179,7 @@ usernames, please consider installing the following plugin to fix the problem:
|
|
174 |
|
175 |
= Do I have to change my Rewrite Settings? =
|
176 |
|
177 |
-
|
178 |
-
It should work out of the box.
|
179 |
|
180 |
|
181 |
= Where can I report bugs, leave my feedback and get support? =
|
@@ -196,6 +200,11 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
196 |
|
197 |
== Changelog ==
|
198 |
|
|
|
|
|
|
|
|
|
|
|
199 |
= 5.6 =
|
200 |
* Responsive admin interface
|
201 |
* CSS Tweaks for better integration
|
@@ -237,7 +246,7 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
237 |
|
238 |
= 5.3 =
|
239 |
* New icon set added
|
240 |
-
*
|
241 |
* Social Network avatar removed when unlinking account
|
242 |
* Social Link reviewed and improved
|
243 |
* Undefined index fixed
|
@@ -255,7 +264,7 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
255 |
* WooCommerce Actions added
|
256 |
* Login/Registration URL filters added
|
257 |
* Cache bug fixed
|
258 |
-
*
|
259 |
* Some minor bugs fixed
|
260 |
|
261 |
= 4.6 =
|
@@ -284,7 +293,7 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
284 |
= 4.3 =
|
285 |
* Social Network Avatars improved
|
286 |
* Social Link shortcode/hook/action added
|
287 |
-
* Administration: Tabs for
|
288 |
* Administration: Column Registration in the user list fixed
|
289 |
* Redirection filters added
|
290 |
* Settings security improved
|
@@ -315,7 +324,7 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
315 |
= 3.5 =
|
316 |
* Social Network "Foursquare.com" added
|
317 |
* Github 16x16px icon fixed
|
318 |
-
* Optionally get an email when a users registers with
|
319 |
* Redirection settings improved
|
320 |
* Hook for Thesis Theme added
|
321 |
* Hook for WordPress Profile Builder added
|
@@ -336,13 +345,11 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
336 |
* CDN path bug fixed
|
337 |
* Table width in administration area fixed
|
338 |
* Administration split to two pages
|
339 |
-
* Optionally disable Social Login in comments
|
340 |
* Optionally request email from user
|
341 |
* Optionally show social networks in user list
|
342 |
* Social Network "Windows Mail" added
|
343 |
* Social Network "Mail.ru" added
|
344 |
* Error message if no social networks selected
|
345 |
-
* Class for Social Login label added
|
346 |
* Small icons fixed
|
347 |
* API settings verification fixed
|
348 |
|
@@ -392,8 +399,6 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
392 |
|
393 |
= 1.4 =
|
394 |
* Social Network Avatars can be displayed in comments
|
395 |
-
* Social Login can be disabled below the login form
|
396 |
-
* Social Login can be disabled below the registration form
|
397 |
* Select redirection target after login
|
398 |
* Select redirection target after registration
|
399 |
* Enable account linking
|
@@ -417,84 +422,4 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
417 |
* Plugin description changed
|
418 |
|
419 |
= 1.0 =
|
420 |
-
* Initial release
|
421 |
-
|
422 |
-
== Testimonials ==
|
423 |
-
|
424 |
-
<strong>Used by thousands of users around the world!</strong>
|
425 |
-
|
426 |
-
<em>The plugin in is one of the best I've seen so far. Extremely easy to implement and run. The support is great too.
|
427 |
-
No concerns on my side. Keep it up!</em>
|
428 |
-
<strong>livia</strong>
|
429 |
-
|
430 |
-
<em>Loving the service, seen a massive increase in painless signups to my blog. Thanks!</em>
|
431 |
-
<strong>Richard B.</strong>
|
432 |
-
|
433 |
-
<em>You have no idea how it THRILLED me to integrate oneall. It was SO amazingly easy, your team has simplified the whole process of signing up for
|
434 |
-
authorization on multiple social media sites. I HAD NO QUESTIONS/STEPS THAT YOU HADN'T ALREADY ANTICIPATED. It saved me HOURS of work!</em>
|
435 |
-
<strong>Kelly C.</strong>
|
436 |
-
|
437 |
-
<em>This is cool. Nice work. I'm VERY impressed. You've made this about as painless as it gets and the value it adds is incredible.</em>
|
438 |
-
<strong>Jason M.</strong>
|
439 |
-
|
440 |
-
<em>This service is simply remarkable, I've tried integrating logins before and it has never been this easy!</em>
|
441 |
-
<strong>Andrew C.</strong>
|
442 |
-
|
443 |
-
<em>I found it extremely straightforward. I just figured it out easily and make my website capable of connecting
|
444 |
-
to many social networks by your plugin.</em>
|
445 |
-
<strong>Deha K.</strong>
|
446 |
-
|
447 |
-
<em>Just wanted to let you know how happy i am that i stumbled onto your service. This was the 6 Facebook/Twitter integration
|
448 |
-
i tried and was starting to lose hope that i could actually find one that worked for me.</em>
|
449 |
-
<strong>Kyle L.</strong>
|
450 |
-
|
451 |
-
<em>I would like to thank YOU! Seriously, the WordPress plugin has been a huge life saver for me.</em>
|
452 |
-
<strong>Piero B.</strong>
|
453 |
-
|
454 |
-
<em>Thank you for the wonderful plugin</em>
|
455 |
-
<strong>Martin P.</strong>
|
456 |
-
|
457 |
-
<em>The service is excellent for what i need, simple to set up. All situations about seting up are well explained, so
|
458 |
-
there are no difficulties</em>
|
459 |
-
<strong>Facundo S.</strong>
|
460 |
-
|
461 |
-
<em>I really like the plugin, the capabilities you provide for management and your prompt reply for support.</em>
|
462 |
-
<strong>Tom B.</strong>
|
463 |
-
|
464 |
-
<em>It was extremely easy to set up and use. The documentation to set up the FB and twitter API
|
465 |
-
was easy to follow and implement. I was struggling with a couple of other plugins till I stumbled on this one.</em>
|
466 |
-
<strong>Deepa V.</strong>
|
467 |
-
|
468 |
-
<em>Works like a charm!</em>
|
469 |
-
<strong>Fredrik L.</strong>
|
470 |
-
|
471 |
-
<em>Not sure how you can improve it's a Damn! Good product. 100% User friendly easy to setup. Thanks!</em>
|
472 |
-
<strong>Cody L.</strong>
|
473 |
-
|
474 |
-
<em>So far oneall.com is the perfect solution for my site and works flawlessly. I am extremely impressed and grateful.</em>
|
475 |
-
<strong>Terry P.</strong>
|
476 |
-
|
477 |
-
<em>I've gone in and tweaked it, tested it and it's good to go now! Wonderful, I feel like a grown up blogger now.</em>
|
478 |
-
<strong>Brian J.</strong>
|
479 |
-
|
480 |
-
<em>I am really impressed with your product! Its very dynamic and its gives me the flexibility I need for integration into my own business.</em>
|
481 |
-
<strong>Braxton D.</strong>
|
482 |
-
|
483 |
-
<em>Your delivery is superb. You should change your name to WONall because you won it all with me. You are awesome, stay that way please.</em>
|
484 |
-
<strong>Nicholas L.</strong>
|
485 |
-
|
486 |
-
<em>I especially enjoy the step by step process that guides you through the Social website App creation process. In the end I would like to thank you
|
487 |
-
for putting together such a great product that so many users can implement with ease.</em>
|
488 |
-
<strong>Stefan C.</strong>
|
489 |
-
|
490 |
-
<em>Thanks for a such a great plugin! I was really impressed with the simplicity of the installation directions and the clean design.</em>
|
491 |
-
<strong>Janae S.</strong>
|
492 |
-
|
493 |
-
<em>I love your service the way it is, it's amazing how easy the logging-in-via-social-network is integrated into a wordpress website!</em>
|
494 |
-
<strong>Martin S.</strong>
|
495 |
-
|
496 |
-
<em>The site and the plugin are working magnificently. Thank you one million times for making your products/services available in the manner that you have.</em>
|
497 |
-
<strong>Herman G.</strong>
|
498 |
-
|
499 |
-
<em>Very user friendly, there are guides and screenshot on how to set things up. Thank you so much for this awesome plugin!</em>
|
500 |
-
<strong>Cebututs</strong>
|
1 |
+
=== Social Login & Register for Wordpress - 40+ Social Networks ===
|
2 |
Contributors: OneAll.com, ClaudeSchlesser, socialloginoneall
|
3 |
+
Tags: social login, social plugin, facebook, facebook login, twitter, google login, twitter login, google, linkedin, apple, apple login
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 5.9
|
6 |
+
Stable tag: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Social Login lets your users login, register and comment with 40+ Social Networks. Easy setup. Maintenance and uptime guarantee. Fulltime developers.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
= Social Login & Register for WordPress =
|
16 |
|
17 |
+
Professionally developed and free Wordpress plugin that allows your visitors to **comment, login and register with 40+ Social Networks** like for example Facebook, Twitter, Google, LinkedIn, PayPal, LiveJournal, Instagram, Вконтакте or Yahoo amongst other.
|
18 |
|
19 |
**Data Protection Guarantee**<br />
|
20 |
+
Fully compliant with all European and U.S. data protection laws. As required by the General Data Protection Regulation (GDPR) the OneAll Terms of Service include a Data Processing Agreement that we can countersign on request.
|
21 |
+
|
22 |
+
**Professionally developed**
|
23 |
+
The plugin is developped by [OneAll](https://www.oneall.com), a technology company providing web-delivered tools to more than 300.000 customers world-wide and this since 2011.
|
24 |
|
25 |
**Seamless Integration**<br />
|
26 |
+
Seamlessly integrates with your existing login/registration system so that your users don't have to start from scratch.
|
27 |
+
|
28 |
+
Existing existing accounts can add/remove their social network accounts in their WordPress profile settings and then also use the linked social networks to login.
|
29 |
|
30 |
**Eliminates Spam and Bot Registrations**<br />
|
31 |
+
Get rid of long and complicated forms, improve your data quality and instantly eliminate spam and bot registrations.
|
32 |
+
|
33 |
+
Social Login increases registration rates by up to 50% and provides permission-based access to users' social network profile data, allowing you to start delivering a personalized experience.
|
34 |
|
35 |
**Maintenance Free**<br />
|
36 |
+
Do not take the risk of losing any users or customers due to outdated social network integrations. Unlike other providers, we monitor the APIs and technologies of the different social networks and update our service as soon as changes arise.
|
37 |
|
38 |
By using OneAll you can be sure that your social media integration will always run smoothly and with the most up-to-date calls.
|
39 |
|
40 |
**Fully Customizable**<br />
|
41 |
+
Easily configure which of the 40+ social networks to enable/disable and on which areas of your Wordpress blog the social login icons should be displayed. These areas include:
|
42 |
+
|
43 |
+
* Below the comments section,
|
44 |
* On the login page
|
45 |
* On the registration page
|
46 |
+
* On side, top and bottom bars,
|
47 |
+
* Or any other area by using a shortcode.
|
48 |
|
49 |
**Fully Compatible With Other Plugins**<br />
|
50 |
+
The plugin uses standard WordPress hooks and is compatible with all other plugins that follow WordPress coding conventions, like per example BuddyPress or WooCommerce amongst others.
|
|
|
51 |
|
52 |
**Data Export**<br />
|
53 |
Easily export your users or automatically push data of users that login using Social Login to Mailchimp or Campaign Monitor.
|
|
|
54 |
|
55 |
|
56 |
**40+ Social Networks**
|
57 |
|
58 |
* Amazon
|
59 |
+
* Apple
|
60 |
* Battle.net
|
61 |
* Blogger
|
62 |
* Discord
|
76 |
* Mixer
|
77 |
* Odnoklassniki
|
78 |
* OpenID
|
79 |
+
* Patreon
|
80 |
* PayPal
|
81 |
* Pinterest
|
82 |
* PixelPin
|
97 |
* Yahoo
|
98 |
* YouTube
|
99 |
|
100 |
+
**Included Features**
|
101 |
|
102 |
* **GDPR compliant**
|
103 |
+
* **Social Link** – Users can link multiple social network accounts to their WordPress account.
|
104 |
+
* **Woocommerce Connect** – Automatic integration on the Woocommerce checkout, login and registration pages.
|
105 |
* **Woocommerce Profile** – Fill the user's billing address with the first name, last name and email address received from the social network.
|
106 |
+
* **BuddyPress Connect** - Automatic integration of the the BuddyPress account and registration pages.
|
107 |
* **BuddyPress Profile** - Use the social network avatar as BuddyPress avatar and fill out custom fields.
|
108 |
* **User Insights** - Access the analytics dashboard to discover which social networks your users prefer.
|
109 |
+
* **Automatic Emails** - Send emails to users that register with a social network account.
|
110 |
+
* **Automatic Notifications** - Send notifications to admins for users that registers using a social network account.
|
111 |
+
* **Comment Approval** - Automatically approve comments left by users.
|
112 |
+
* **Email Retrieval** - Ask users to enter their email when the social network does not provide it.
|
113 |
+
* **Integrated Widget** - Use the integration widget to display the icons wherever you want.
|
|
|
114 |
* **ShortCodes** - Easily embed social login anywhere by using the available shortcodes.
|
115 |
+
* **Hook** - Customize the plugin behaviour by using the integrated hooks.
|
116 |
+
* **Icon Themes** - Choose amongst three different icon themes.
|
117 |
+
* **Documentation** - Access a [complete documentation](https://docs.oneall.com/plugins/guide/social-login-wordpress/) on the available hooks and filters for WordPress.
|
|
|
118 |
|
119 |
|
120 |
+
**Premium Features**
|
121 |
|
122 |
+
* **Authentication Filters** - Use customisable IP and/or email filters to restrict which users may login and register.
|
123 |
+
* **Data Export** - Automatically export data to Campaign Monitor or MailChimp or export as CSV.
|
124 |
+
* **User Insights** - Access analytics and get demographic information about your users.
|
125 |
+
* **Icon Themes** - Choose amongst twenty different icon themes or use you own icons.
|
126 |
|
127 |
|
128 |
**Professionally Developed and Maintained**
|
142 |
4. Click on the **Autodetect** and **Verify** buttons to make sure that the API connection is working properly.
|
143 |
|
144 |
= API Connection =
|
145 |
+
The social network APIs are constantly changing and being updated. We monitor these changes and automatically update our APIs, so that you can be sure that the plugin always uses the most up-to-date API calls.
|
146 |
|
147 |
In order to enable the plugin you must connect with the OneAll API and create a free account at [OneAll](https://app.oneall.com).
|
148 |
|
149 |
+
More information is available in our [Documentation](https://docs.oneall.com/plugins/guide/social-login-wordpress/).
|
150 |
|
151 |
== Frequently Asked Questions ==
|
152 |
|
153 |
= Do I have to add template tags to my theme? =
|
154 |
|
155 |
You should not have to change your templates.
|
156 |
+
The plugin seamlessly integrates into your blog by using standard WordPress hooks.
|
157 |
|
158 |
= Can Social Login be embedded through a shortcode? =
|
159 |
|
160 |
+
The shortcode `[oa_social_login]` can be used in any page or post within your WordPress blog.
|
161 |
The shortcode will automatically be replaced by the icons of the social networks that you have
|
162 |
+
enabled in the plugin settings in your WordPress administration area.
|
163 |
|
164 |
= I have a custom template and the plugin is not displayed correctly =
|
165 |
|
166 |
+
The plugin uses standard WordPress hooks. If your theme does not support these hooks,
|
167 |
+
you can add Social Login manually by inserting the following code in your template (at the location where it should be displayed, i.e. above the comments).
|
|
|
168 |
|
169 |
`<?php do_action('oa_social_login'); ?>`
|
170 |
|
179 |
|
180 |
= Do I have to change my Rewrite Settings? =
|
181 |
|
182 |
+
The plugin does not rely on mod_rewrite and does not need any additional rules. It should work out of the box.
|
|
|
183 |
|
184 |
|
185 |
= Where can I report bugs, leave my feedback and get support? =
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 5.7 =
|
204 |
+
* Apple added
|
205 |
+
* Patreon added
|
206 |
+
* Google logo fixed
|
207 |
+
|
208 |
= 5.6 =
|
209 |
* Responsive admin interface
|
210 |
* CSS Tweaks for better integration
|
246 |
|
247 |
= 5.3 =
|
248 |
* New icon set added
|
249 |
+
* Interface improved
|
250 |
* Social Network avatar removed when unlinking account
|
251 |
* Social Link reviewed and improved
|
252 |
* Undefined index fixed
|
264 |
* WooCommerce Actions added
|
265 |
* Login/Registration URL filters added
|
266 |
* Cache bug fixed
|
267 |
+
* Fixed a bug with icons being display twice for WooCommerce
|
268 |
* Some minor bugs fixed
|
269 |
|
270 |
= 4.6 =
|
293 |
= 4.3 =
|
294 |
* Social Network Avatars improved
|
295 |
* Social Link shortcode/hook/action added
|
296 |
+
* Administration: Tabs for plugin settings added
|
297 |
* Administration: Column Registration in the user list fixed
|
298 |
* Redirection filters added
|
299 |
* Settings security improved
|
324 |
= 3.5 =
|
325 |
* Social Network "Foursquare.com" added
|
326 |
* Github 16x16px icon fixed
|
327 |
+
* Optionally get an email when a users registers with a social network account
|
328 |
* Redirection settings improved
|
329 |
* Hook for Thesis Theme added
|
330 |
* Hook for WordPress Profile Builder added
|
345 |
* CDN path bug fixed
|
346 |
* Table width in administration area fixed
|
347 |
* Administration split to two pages
|
|
|
348 |
* Optionally request email from user
|
349 |
* Optionally show social networks in user list
|
350 |
* Social Network "Windows Mail" added
|
351 |
* Social Network "Mail.ru" added
|
352 |
* Error message if no social networks selected
|
|
|
353 |
* Small icons fixed
|
354 |
* API settings verification fixed
|
355 |
|
399 |
|
400 |
= 1.4 =
|
401 |
* Social Network Avatars can be displayed in comments
|
|
|
|
|
402 |
* Select redirection target after login
|
403 |
* Select redirection target after registration
|
404 |
* Enable account linking
|
422 |
* Plugin description changed
|
423 |
|
424 |
= 1.0 =
|
425 |
+
* Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|