summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2013-09-12 09:49:28 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2013-09-12 09:49:28 (GMT)
commita75a5d73aa757bfecb11428cc71169af9d44a954 (patch)
tree14f56c9bd6a7f773375abd19c5d9be89004c0bf9
parent7d7ca345d6c8d24bcba593cb92cb90ebb3449308 (diff)
downloadmontpellier-a75a5d73aa757bfecb11428cc71169af9d44a954.zip
montpellier-a75a5d73aa757bfecb11428cc71169af9d44a954.tar.gz
montpellier-a75a5d73aa757bfecb11428cc71169af9d44a954.tar.bz2
mon_agglo_comptecitoyen: don't allow to create account in Drupal
Fixes #3577
-rw-r--r--drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module38
1 files changed, 23 insertions, 15 deletions
diff --git a/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module b/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
index a3c0fbc..ece9f1c 100644
--- a/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
+++ b/drupal/mon_agglo_comptecitoyen/mon_agglo_comptecitoyen.module
@@ -1,15 +1,23 @@
-<?php
-
-function _edit_user_callback() {
- unset($_REQUEST['destination']);
- return drupal_goto('https://compte-citoyen.montpellier-agglo.com/fr/mon-compte');
-}
-
-/**
- * Implements hook_menu_alter().
- */
-function mon_agglo_comptecitoyen_menu_alter(&$items) {
-
- $items['user']['page callback'] = '_edit_user_callback';
- $items['user/%user_uid_optional']['page callback'] = '_edit_user_callback';
-}
+<?php
+
+function _edit_user_callback() {
+ unset($_REQUEST['destination']);
+ return drupal_goto("https://compte-citoyen.montpellier-agglo.com/fr/mon-compte");
+}
+
+function _create_user_callback() {
+ unset($_REQUEST['destination']);
+ return drupal_goto("https://compte-citoyen.montpellier-agglo.com/accounts/register");
+}
+
+/**
+ * Implements hook_menu_alter().
+ */
+function mon_agglo_comptecitoyen_menu_alter(&$items) {
+
+ $items['user']['page callback'] = '_edit_user_callback';
+ $items['user/%user_uid_optional']['page callback'] = '_edit_user_callback';
+
+ $items['admin/people/create']['page callback'] = '_create_user_callback';
+}
+