Browse Source

replace register form to join us link on home login block

Bachir Soussi Chiadmi 11 years ago
parent
commit
3bdbc68690
1 changed files with 7 additions and 4 deletions
  1. 7 4
      materio_user.module

+ 7 - 4
materio_user.module

@@ -54,10 +54,13 @@ function materio_user_block_view($delta = '') {
         $block['subject'] = '';//drupal_is_front_page() ? t('Your projects will born from here') : t('Create your materiO\' account');
         $block['content'] = '<h3>'. t('Login') . '</h3>';
         $block['content'] .= drupal_render(drupal_get_form('user_login'));
-        $block['content'] .= '<h3>'. t('<span>or </span>create your materiO\' account') . '</h3>';
-        $block['content'] .= drupal_render(drupal_get_form('user_register_form'));
-        
-        
+        if (drupal_is_front_page()) {
+          $block['content'] .= '<h3>'. t('<span>or </span>create your materiO\' account') . '</h3>';
+          $block['content'] .= l(t('Join us'), 'node/11187', array("attributes"=>array("class"=>array("join"))));
+        }else{
+          $block['content'] .= '<h3>'. t('<span>or </span>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;