I read the README from https://github.com/SocalNick/ScnSocialAuth. I can not use the ZendSkeleton because I want to integrate it in an existing project.
I'm quiet new and the README does not answer some question, like
- How do I integrate it with my zfc-user/login.phtml / register.phtml etc.?
- What do I do after the last step in the README?
- What page do I need to access to test if it works?
My problem is that the README has an abrupt end and leaves me in the dark about how to use/access it.
However, I followed all the steps in the README and end up with the following error:
PHP Fatal error: Call to a member function getEnabledProviders() on a non-object in /view/zfc-user/user/login.phtml on line 3
My zfc-user/login.phtml
<?php
$socialSignIn = true;
foreach ($this->options->getEnabledProviders() as $provider) {
if ($socialSignIn) {
echo '<h1>Social Sign In</h1>';
$socialSignIn = false;
}
echo '<dd>' . $this->socialSignInButton($provider, $this->redirect) . '</dd>';
}
if ($this->options->getSocialLoginOnly() == false) {
echo $this->zfcUserLogin;
}
?>
application.config.php
'modules' => array(
'Application',
'ScnSocialAuth',
'ZfcBase',
'ZfcUser'
...
composer.json
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*",
"zendframework/zend-diactoros": "*",
"zf-commons/zfc-base": "*",
"zf-commons/zfc-user": "1.2.*",
"neilime/zf2-twb-bundle": "*",
"symfony/yaml": "*",
"snapshotpl/zf-snap-jquery": "dev-master",
"zendframework/zendservice-recaptcha": "2.*",
"socalnick/scn-social-auth": "1.*"
},
"autoload": {
"psr-0": {
"Hybrid": "vendor/hybridauth/hybridauth/hybridauth/"
}
}
composers autoload_namespaces.php
return array(
'phpDocumentor' => array($vendorDir . '/phpdocumentor/reflection-docblock/src'),
'ZfcUser' => array($vendorDir . '/zf-commons/zfc-user/src'),
'ZfcBase' => array($vendorDir . '/zf-commons/zfc-base/src'),
'ZfSnapJquery' => array($vendorDir . '/snapshotpl/zf-snap-jquery/src'),
'ZendXml' => array($vendorDir . '/zendframework/zendxml/library'),
'ZendService' => array($vendorDir . '/zendframework/zendservice-recaptcha/library'),
'TwbBundle' => array($vendorDir . '/neilime/zf2-twb-bundle/src'),
'ScnSocialAuthTest' => array($vendorDir . '/socalnick/scn-social-auth/test'),
'ScnSocialAuth' => array($vendorDir . '/socalnick/scn-social-auth/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'),
'Hybrid' => array($vendorDir . '/hybridauth/hybridauth/hybridauth', $vendorDir . '/hybridauth/hybridauth/hybridauth'),
);
Do I miss something in the docs or is it just the heat that's screwing with my head?