From dae0c7391ab8308506bddc5fff76414a3bb87ce4 Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Fri, 29 Jan 2016 20:15:53 -0500
Subject: Move Google authentication to an external plugin
---
app/Template/user/authentication.php | 3 +--
app/Template/user/external.php | 20 ++++----------------
2 files changed, 5 insertions(+), 18 deletions(-)
(limited to 'app/Template/user')
diff --git a/app/Template/user/authentication.php b/app/Template/user/authentication.php
index 20c3d372..1f2d2a69 100644
--- a/app/Template/user/authentication.php
+++ b/app/Template/user/authentication.php
@@ -8,8 +8,7 @@
= $this->form->hidden('id', $values) ?>
= $this->form->hidden('username', $values) ?>
- = $this->form->label(t('Google Id'), 'google_id') ?>
- = $this->form->text('google_id', $values, $errors) ?>
+ = $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?>
= $this->form->label(t('Github Id'), 'github_id') ?>
= $this->form->text('github_id', $values, $errors) ?>
diff --git a/app/Template/user/external.php b/app/Template/user/external.php
index 8b1d3c46..8c9a0259 100644
--- a/app/Template/user/external.php
+++ b/app/Template/user/external.php
@@ -2,21 +2,7 @@
= t('External authentications') ?>
-
- = t('Google Account') ?>
-
-
- user->isCurrentUser($user['id'])): ?>
-
- = $this->url->link(t('Link my Google Account'), 'oauth', 'google', array(), true) ?>
-
- = $this->url->link(t('Unlink my Google Account'), 'oauth', 'unlink', array('backend' => 'Google'), true) ?>
-
-
- = empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?>
-
-
-
+hook->render('template:user:external', array('user' => $user)) ?>
= t('Github Account') ?>
@@ -50,6 +36,8 @@
-
+
= t('No external authentication enabled.') ?>
+
+ = $html ?>
--
cgit v1.2.3