plugins/SpecialUserFuncs.php
changeset 799 4629ad98ee88
parent 782 96848f04bbba
child 801 eb8b23f11744
equal deleted inserted replaced
798:ddfc1b554a08 799:4629ad98ee88
   787         else
   787         else
   788         {
   788         {
   789           $password = $_POST['password'];
   789           $password = $_POST['password'];
   790         }
   790         }
   791         
   791         
   792         // CAPTCHA code was correct, create the account
   792         $error =& $s;
   793         // ... and check for errors returned from the crypto API
   793         
       
   794         /**
       
   795          * Validation of POST data coming from registration. Put an error message in the variable $error to stop registration.
       
   796          * @hook ucp_register_validate
       
   797          */
       
   798         
       
   799         $code = $plugins->setHook('ucp_register_validate');
       
   800         foreach ( $code as $cmd )
       
   801         {
       
   802           eval($cmd);
       
   803         }
       
   804         
       
   805         // All things verified, create account
   794         if ( !$s )
   806         if ( !$s )
   795           $s = $session->create_user($_POST['username'], $password, $_POST['email'], $_POST['real_name'], $coppa);
   807           $s = $session->create_user($_POST['username'], $password, $_POST['email'], $_POST['real_name'], $coppa);
   796       }
   808       }
   797     }
   809     }
   798     if($s == 'success' && !$coppa)
   810     if($s == 'success' && !$coppa)
   923               <td class="row3" style="width: 50%;">
   935               <td class="row3" style="width: 50%;">
   924                 <?php echo $lang->get('user_reg_lbl_field_realname'); ?><br />
   936                 <?php echo $lang->get('user_reg_lbl_field_realname'); ?><br />
   925                 <small><?php echo $lang->get('user_reg_msg_realname_optional'); ?></small>
   937                 <small><?php echo $lang->get('user_reg_msg_realname_optional'); ?></small>
   926               </td>
   938               </td>
   927               <td class="row3" style="width: 50%;">
   939               <td class="row3" style="width: 50%;">
   928                 <input tabindex="5" type="text" name="real_name" size="30" value="<?php echo $realname; ?>" /></td><td class="row3" style="max-width: 24px;">
   940                 <input tabindex="5" type="text" name="real_name" size="30" value="<?php echo $realname; ?>" />
       
   941               </td>
       
   942               <td class="row3" style="max-width: 24px;">
   929               </td>
   943               </td>
   930             </tr>
   944             </tr>
       
   945             
       
   946             <?php
       
   947             /**
       
   948              * Allows adding fields to the user registration form. Form is built with Enano tables, 3 columns. (Rightmost can be left empty or if you're using Javascript validation an image you can update with your own Javascript code)
       
   949              * @hook ucp_register_form
       
   950              */
       
   951             
       
   952             $code = $plugins->setHook('ucp_register_form');
       
   953             foreach ( $code as $cmd )
       
   954             {
       
   955               eval($cmd);
       
   956             }
       
   957             ?>
   931             
   958             
   932             <!-- FIELD: CAPTCHA image -->
   959             <!-- FIELD: CAPTCHA image -->
   933             <tr>
   960             <tr>
   934               <td class="row1" style="width: 50%;" rowspan="2">
   961               <td class="row1" style="width: 50%;" rowspan="2">
   935                 <?php echo $lang->get('user_reg_lbl_field_captcha'); ?><br />
   962                 <?php echo $lang->get('user_reg_lbl_field_captcha'); ?><br />