--- configuration.php-dist.orig Sat Sep 10 23:44:01 2005 +++ configuration.php-dist Mon Sep 12 00:50:54 2005 @@ -60,6 +60,7 @@ $mosConfig_gzip = '0'; $mosConfig_multipage_toc = '0'; $mosConfig_allowUserRegistration = '1'; +$mosConfig_requireAdministratorActivation = '0'; $mosConfig_error_reporting = -1; $mosConfig_error_message = 'This site is temporarily unavailable.
Please contact your System Administrator.'; $mosConfig_link_titles = '0'; --- language/english.php.orig Mon Sep 12 00:51:48 2005 +++ language/english.php Sun Sep 11 23:40:59 2005 @@ -322,6 +322,15 @@ Username - %s Password - %s'); +DEFINE('_USEND_MSG_ACTIVATE_BYADMINISTRATOR','Hello %s, + +Thank you for registering at %s. Your account is created and has to be activated by an Administrator, please +be patient. + +After activation you may login to %s using the following username and password: + +Username: %s +Password: %s'); DEFINE('_USEND_MSG', "Hello %s, Thank you for registering at %s. @@ -340,10 +349,22 @@ Username - %s Please do not respond to this message as it is automatically generated and is for information purposes only'); +DEFINE('_ASEND_MSG_ACTIVATE_BYADMINISTRATOR','Hello %s, + +A new user has registered at %s and has to be activated by you. +This email contains their details: + +Name: %s +E-mail: %s +Username: %s + +QuickActivation +%s'); DEFINE('_REG_COMPLETE_NOPASS','
Registration Complete!

  ' .'You may now login.
  '); DEFINE('_REG_COMPLETE', '
Registration Complete!

You may now login.'); DEFINE('_REG_COMPLETE_ACTIVATE', '
Registration Complete!

Your account has been created and activation link has been sent to the e-mail address you entered. Note that you must activate the account by clicking on the activation link when you get the e-mail before you can login.'); +DEFINE('_REG_COMPLETE_ACTIVATE_BYADMINISTRATOR', '
Registration Complete!

Your account has been created and has to be activated by an Administrator before you can log in. Please be patient.'); DEFINE('_REG_ACTIVATE_COMPLETE', '
Activation Complete!

Your account has been successfully activated. You can now login using the username and password you choose during the registration.'); DEFINE('_REG_ACTIVATE_NOT_FOUND', '
Invalid Activation Link!

There is no such account in our database or the account has already been activated.'); @@ -517,4 +538,4 @@ Message: " ); -?> \ No newline at end of file +?> --- components/com_registration/registration.php.orig Mon Sep 12 00:55:03 2005 +++ components/com_registration/registration.php Mon Sep 12 00:36:34 2005 @@ -103,7 +103,7 @@ function saveRegistration( $option ) { global $database, $my, $acl; - global $mosConfig_sitename, $mosConfig_live_site, $mosConfig_useractivation, $mosConfig_allowUserRegistration; + global $mosConfig_sitename, $mosConfig_live_site, $mosConfig_useractivation,$mosConfig_requireAdministratorActivation, $mosConfig_allowUserRegistration; global $mosConfig_mailfrom, $mosConfig_fromname, $mosConfig_mailfrom, $mosConfig_fromname; if ($mosConfig_allowUserRegistration=="0") { @@ -124,7 +124,7 @@ $row->usertype = ''; $row->gid = $acl->get_group_id('Registered','ARO'); - if ($mosConfig_useractivation=="1") { + if ($mosConfig_useractivation=="1"|| $mosConfig_requireAdministratorActivation=="1") { $row->activation = md5( mosMakePassword() ); $row->block = "1"; } @@ -150,7 +150,10 @@ $subject = sprintf (_SEND_SUB, $name, $mosConfig_sitename); $subject = html_entity_decode($subject, ENT_QUOTES); - if ($mosConfig_useractivation=="1"){ + if ($mosConfig_requireAdministratorActivation=="1"){ + $message = sprintf (_USEND_MSG_ACTIVATE_BYADMINISTRATOR, $name, $mosConfig_sitename, $mosConfig_live_site, $username, $pwd); + } + else if ($mosConfig_useractivation=="1"){ $message = sprintf (_USEND_MSG_ACTIVATE, $name, $mosConfig_sitename, $mosConfig_live_site."/index.php?option=com_registration&task=activate&activation=".$row->activation, $mosConfig_live_site, $username, $pwd); } else { $message = sprintf (_USEND_MSG, $name, $mosConfig_sitename, $mosConfig_live_site); @@ -174,7 +177,11 @@ // Send notification to all administrators $subject2 = sprintf (_SEND_SUB, $name, $mosConfig_sitename); - $message2 = sprintf (_ASEND_MSG, $adminName2, $mosConfig_sitename, $row->name, $email, $username); + if ($mosConfig_requireAdministratorActivation=="1") { + $message2 = sprintf (_ASEND_MSG_ACTIVATE_BYADMINISTRATOR, $adminName2, $mosConfig_sitename, $row->name, $email, $username, $mosConfig_live_site."/index.php?option=com_registration&task=activate&activation=".$row->activation ); + } else { + $message2 = sprintf (_ASEND_MSG, $adminName2, $mosConfig_sitename, $row->name, $email, $username); + } $subject2 = html_entity_decode($subject2, ENT_QUOTES); $message2 = html_entity_decode($message2, ENT_QUOTES); @@ -192,8 +199,9 @@ mosMail($adminEmail2, $adminName2, $row->email, $subject2, $message2); } } - - if ( $mosConfig_useractivation == "1" ){ + if ( $mosConfig_requireAdministratorActivation=="1") { + echo _REG_COMPLETE_ACTIVATE_BYADMINISTRATOR; + } else if ( $mosConfig_useractivation == "1" ){ echo _REG_COMPLETE_ACTIVATE; } else { echo _REG_COMPLETE; --- administrator/components/com_config/admin.config.html.php.orig Sat Sep 10 23:43:41 2005 +++ administrator/components/com_config/admin.config.html.php Sun Sep 11 06:29:51 2005 @@ -178,6 +178,13 @@ ?> + Require Administrator Activation: + + + + + + Require Unique Email: config_live_site; ?>   + + Live Site Dynamic Creation: + + + + +   + + + Enable SSL: + + + + +   + Secret Word: config_secret; ?> @@ -745,4 +768,4 @@ } } -?> \ No newline at end of file +?> --- administrator/components/com_config/admin.config.php.orig Sat Sep 10 23:43:23 2005 +++ administrator/components/com_config/admin.config.php Sun Sep 11 06:30:40 2005 @@ -95,6 +99,8 @@ /** @var int */ var $config_allowUserRegistration=0; /** @var int */ + var $config_requireAdministratorActivation=0; + /** @var int */ var $config_error_reporting=0; /** @var int */ var $config_link_titles=0; @@ -188,6 +196,7 @@ 'config_gzip' =>'mosConfig_gzip', 'config_multipage_toc' =>'mosConfig_multipage_toc', 'config_allowUserRegistration' =>'mosConfig_allowUserRegistration', + 'config_requireAdministratorActivation' => 'mosConfig_requireAdministratorActivation', 'config_link_titles' =>'mosConfig_link_titles', 'config_error_reporting' =>'mosConfig_error_reporting', 'config_list_limit' =>'mosConfig_list_limit', @@ -361,6 +370,8 @@ $lists['allowuserregistration'] = mosHTML::yesnoRadioList( 'config_allowUserRegistration', 'class="inputbox"', $row->config_allowUserRegistration ); + $lists['requireAdministratorActivation'] = mosHTML::yesnoRadioList( 'config_requireAdministratorActivation', 'class="inputbox"', $row->config_requireAdministratorActivation ); + $lists['debug'] = mosHTML::yesnoRadioList( 'config_debug', 'class="inputbox"', $row->config_debug ); $lists['offset'] = mosHTML::selectList( $timeoffset, 'config_offset', 'class="inputbox" size="1"', 'value', 'text', $row->config_offset ); @@ -527,4 +542,4 @@ mosRedirect( 'index2.php', 'An Error Has Occurred! Unable to open config file to write!' ); } } -?> \ No newline at end of file +?>