register block : login pass first, before register
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
f9a60fe62d
commit
87edb46954
@ -51,10 +51,14 @@ function materio_user_block_view($delta = '') {
|
|||||||
switch ($delta) {
|
switch ($delta) {
|
||||||
case 'user_register':
|
case 'user_register':
|
||||||
if(isset($user->roles[1])){
|
if(isset($user->roles[1])){
|
||||||
$block['subject'] = t('Create your materiO\' account');//drupal_is_front_page() ? t('Your projects will born from here') : t('Create your materiO\' account');
|
$block['subject'] = '';//drupal_is_front_page() ? t('Your projects will born from here') : t('Create your materiO\' account');
|
||||||
$block['content'] = drupal_render(drupal_get_form('user_register_form'));
|
$block['content'] = '<h3>'. t('Login') . '</h3>';
|
||||||
$block['content'] .= '<h3>'. t('or login if you already have an account') . '</h3>';
|
|
||||||
$block['content'] .= drupal_render(drupal_get_form('user_login'));
|
$block['content'] .= drupal_render(drupal_get_form('user_login'));
|
||||||
|
$block['content'] .= '<h3>'. t('or create your materiO\' account') . '</h3>';
|
||||||
|
$block['content'] .= drupal_render(drupal_get_form('user_register_form'));
|
||||||
|
|
||||||
|
|
||||||
|
// $block['content'] .= l(t('Pricing'), 'node/11187', array('attributes' => array('class' => 'pricing'),));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'old_database_link':
|
case 'old_database_link':
|
||||||
@ -92,11 +96,11 @@ function materio_user_form_alter(&$form, &$form_state, $form_id) {
|
|||||||
$form['actions']['#type'] = "container";
|
$form['actions']['#type'] = "container";
|
||||||
$form['actions']['submit']['#value'] = t('Join');
|
$form['actions']['submit']['#value'] = t('Join');
|
||||||
|
|
||||||
$form['termsofservices'] = array(
|
// $form['termsofservices'] = array(
|
||||||
'#type' => 'checkbox',
|
// '#type' => 'checkbox',
|
||||||
'#title' => t('I accept') .' '. l(t('the materiO terms of services'), 'node/11183'),
|
// '#title' => t('I accept') .' '. l(t('the materiO terms of services'), 'node/11183'),
|
||||||
'#required' => true,
|
// '#required' => true,
|
||||||
);
|
// );
|
||||||
|
|
||||||
$form['#submit'][] = "materio_user_user_register_form_submit";
|
$form['#submit'][] = "materio_user_user_register_form_submit";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user