?> <?php if (count(Cii::getHybridAuthProviders()) >= 1) { ?> <div class="clearfix" style="border-bottom: 1px solid #aaa; margin: 15px;"></div> <span class="login-form-links"><?php echo Yii::t('DefaultTheme', "Or register with one of these social networks"); ?> </span> <?php } ?> <div class="clearfix"></div> <div class="social-buttons"> <?php foreach (Cii::getHybridAuthProviders() as $k => $v) { ?> <?php if (Cii::get($v, 'enabled', false) == 1) { ?> <?php echo CHtml::link(NULL, $this->createUrl('/hybridauth/' . $k), array('class' => 'social-icons ' . strtolower($k))); ?> <?php } ?> <?php } ?> </div> <?php
public function afterSave() { Yii::app()->cache->set('hybridauth_providers', false); Cii::getHybridAuthProviders(); return parent::afterSave(); }
/** * Convert configuration to an array for Hybrid_Auth, rather than object properties as supplied by Yii * @return array */ public function getConfig() { return array('baseUrl' => Yii::app()->getBaseUrl(true), 'base_url' => Yii::app()->getBaseUrl(true) . '/hybridauth/callback', 'providers' => CMap::mergeArray($this->providers, Cii::getHybridAuthProviders())); }