registerFunction( 'onBeforeUserRegistration', 'onBeforeUserRegistration', 'getconfirmemailTab' ); } class getconfirmemailTab extends cbTabHandler { /** * Constructor */ function getConfirmEmailTab() { $this->cbTabHandler(); } /** * Retrieves relevant CB Confirm Email parameters and puts in session. This would not be necessary in this case, I just wanted to try out! */ function _putConfirmEmailParameters() { global $mainframe; static $cbconfirmemailparms = array(); if ( count( $cbconfirmemailparms ) == 0 ) { $params = $this->params; // Plugin Parameters with default settings $cbconfirmemailparms['confirmemailRegistration'] = $params->get('confirmemailRegistration', 0); if ( session_id() == '' ) { session_start(); } $_SESSION['cbconfirmemailparams'] = $cbconfirmemailparms; // this is needed to send data to stand-alone php file } } /** * Generates the HTML to display the registration tab/area * @param object tab reflecting the tab database entry * @param object mosUser reflecting the user being displayed (here null) * @param int 1 for front-end, 2 for back-end * @return mixed : either string HTML for tab content, or false if ErrorMSG generated */ function getDisplayRegistration($tab, $user, $ui) { global $mainframe, $_POST; $params = $this->params; if (!$params->get('confirmemailRegistration',1)) { return null; } $dummy = $this->_putConfirmEmailParameters(); $return = "