summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2015-01-27 10:00:35 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2015-01-27 10:00:35 (GMT)
commit07810c5a2eff01cb03913ee4c5ae186943f022f8 (patch)
tree9727e39656415ea9d6d3768b1d59021c886e6962
parentfbcc785e5b9fd89976090c533f9710a0f33ec782 (diff)
downloadmontpellier-07810c5a2eff01cb03913ee4c5ae186943f022f8.zip
montpellier-07810c5a2eff01cb03913ee4c5ae186943f022f8.tar.gz
montpellier-07810c5a2eff01cb03913ee4c5ae186943f022f8.tar.bz2
mon_agglo_comptecitoyen.module: enable manual login
Closes #6323
-rw-r--r--drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module31
1 files changed, 29 insertions, 2 deletions
diff --git a/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module b/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
index ece9f1c..6c482ae 100644
--- a/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
+++ b/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
@@ -2,12 +2,24 @@
function _edit_user_callback() {
unset($_REQUEST['destination']);
- return drupal_goto("https://compte-citoyen.montpellier-agglo.com/fr/mon-compte");
+ return drupal_goto("https://connexion.montpellier-agglo.com/accounts");
}
function _create_user_callback() {
unset($_REQUEST['destination']);
- return drupal_goto("https://compte-citoyen.montpellier-agglo.com/accounts/register");
+ return drupal_goto("https://connexion.montpellier-agglo.com/accounts/register");
+}
+
+/* user_login hook) */
+function mon_agglo_comptecitoyen_user_login(&$edit, $account) {
+ $edit['redirect'] = '';
+}
+
+/**
+ * Show /manual_login page
+ */
+function mon_agglo_comptecitoyen_login_page() {
+ return drupal_get_form('user_login');
}
/**
@@ -21,3 +33,18 @@ function mon_agglo_comptecitoyen_menu_alter(&$items) {
$items['admin/people/create']['page callback'] = '_create_user_callback';
}
+/**
+ * Implements hook_menu().
+ */
+function mon_agglo_comptecitoyen_menu() {
+ $items = array();
+
+ $items['manual_login'] = array(
+ 'title' => 'User account',
+ 'page callback' => 'mon_agglo_comptecitoyen_login_page',
+ 'access callback' => TRUE,
+ );
+
+ return $items;
+}
+