RomanL 8 лет назад
Родитель
Сommit
00b1b63e90

+ 2 - 0
inc/classes/BxDolProfile.php

@@ -483,6 +483,8 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         // alert about status changing
         bx_alert('profile', $sAlertActionName, $iProfileId, false, array('action' => $iAction));
 
+        $bSendEmailNotification = $bSendEmailNotification & BxDolService::call($this->getModule(), 'is_enable_profile_activation_letter');
+        
         // send email to member about status change
         if ($bSendEmailNotification)
             sendMailTemplate('t_ChangeStatus' . ucfirst($sStatus), $oAccount->id(), $iProfileId, array('status' => $sStatus), BX_EMAIL_SYSTEM);

+ 10 - 1
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -672,7 +672,16 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
 
         return $s;
     }
-
+    
+    /**
+     * check enabled profile activation letter
+     */
+    public function  serviceIsEnableProfileActivationLetter()
+    {
+        $CNF = &$this->_oConfig->CNF;
+        return (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']).$CNF['PARAM_ENABLE_ACTIVATION_LETTER'];//isset($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) ? (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) : true;
+    }
+    
     /**
      * For internal usage only.
      */

+ 1 - 0
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -74,6 +74,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
 
             // some params
             'PARAM_AUTOAPPROVAL' => 'bx_organizations_autoapproval',
+            'PARAM_ENABLE_ACTIVATION_LETTER' => 'bx_organizations_enable_profile_activation_letter',
             'PARAM_DEFAULT_ACL_LEVEL' => 'bx_organizations_default_acl_level',
             'PARAM_NUM_RSS' => 'bx_organizations_num_rss',
             'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_organizations_num_connections_quick',

+ 2 - 1
modules/boonex/organizations/install/langs/en.xml

@@ -6,7 +6,8 @@
 
 	<string name="_bx_orgs_option_autoapproval"><![CDATA[Activate all organizations after creation automatically]]></string>
 	<string name="_bx_orgs_option_default_acl_level"><![CDATA[Default level to assign after organizations's profile creation]]></string>
-	<string name="_bx_orgs_option_redirect_aadd"><![CDATA[Redirect after organizations's profile creation to]]></string>
+  <string name="_bx_orgs_option_enable_profile_activation_letter"><![CDATA[Enable profile activation letter]]></string>
+  <string name="_bx_orgs_option_redirect_aadd"><![CDATA[Redirect after organizations's profile creation to]]></string>
     <string name="_bx_orgs_option_redirect_aadd_profile"><![CDATA[Profile Page]]></string>
     <string name="_bx_orgs_option_redirect_aadd_last"><![CDATA[Last Page]]></string>
     <string name="_bx_orgs_option_redirect_aadd_custom"><![CDATA[Custom Page]]></string>

+ 2 - 1
modules/boonex/organizations/install/sql/enable.sql

@@ -22,7 +22,8 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_organizations_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
 ('bx_organizations_searchable_fields', 'org_name,org_desc', @iCategId, '_bx_orgs_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:21:"get_searchable_fields";}', '', '', 20),
 ('bx_organizations_public_subscriptions', '', @iCategId, '_bx_orgs_option_public_subscriptions', 'checkbox', '', '', '', 30),
-('bx_organizations_public_subscribed_me', '', @iCategId, '_bx_orgs_option_public_subscribed_me', 'checkbox', '', '', '', 31);
+('bx_organizations_public_subscribed_me', '', @iCategId, '_bx_orgs_option_public_subscribed_me', 'checkbox', '', '', '', 31),
+('bx_organizations_enable_profile_activation_letter', 'on', @iCategId, '_bx_orgs_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32);
 
 -- PAGES
 

+ 1 - 0
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -68,6 +68,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
 
             // some params
             'PARAM_AUTOAPPROVAL' => 'bx_persons_autoapproval',
+            'PARAM_ENABLE_ACTIVATION_LETTER' => 'bx_persons_enable_profile_activation_letter',
             'PARAM_DEFAULT_ACL_LEVEL' => 'bx_persons_default_acl_level',
             'PARAM_NUM_RSS' => 'bx_persons_num_rss',
             'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_persons_num_connections_quick',

+ 2 - 1
modules/boonex/persons/install/langs/en.xml

@@ -6,7 +6,8 @@
 
 	<string name="_bx_persons_option_autoapproval"><![CDATA[Activate all persons after creation automatically]]></string>
 	<string name="_bx_persons_option_default_acl_level"><![CDATA[Default member's level to assign after person's profile creation]]></string>
-	<string name="_bx_persons_option_redirect_aadd"><![CDATA[Redirect after person's profile creation to]]></string>
+  <string name="_bx_persons_option_enable_profile_activation_letter"><![CDATA[Enable profile activation letter]]></string>
+  <string name="_bx_persons_option_redirect_aadd"><![CDATA[Redirect after person's profile creation to]]></string>
 	<string name="_bx_persons_option_redirect_aadd_profile"><![CDATA[Profile Page]]></string>
 	<string name="_bx_persons_option_redirect_aadd_last"><![CDATA[Last Page]]></string>
 	<string name="_bx_persons_option_redirect_aadd_custom"><![CDATA[Custom Page]]></string>

+ 2 - 1
modules/boonex/persons/install/sql/enable.sql

@@ -22,7 +22,8 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_persons_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
 ('bx_persons_searchable_fields', 'fullname,description', @iCategId, '_bx_persons_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:21:"get_searchable_fields";}', '', '', 20),
 ('bx_persons_public_subscriptions', '', @iCategId, '_bx_persons_option_public_subscriptions', 'checkbox', '', '', '', 30),
-('bx_persons_public_subscribed_me', '', @iCategId, '_bx_persons_option_public_subscribed_me', 'checkbox', '', '', '', 31);
+('bx_persons_public_subscribed_me', '', @iCategId, '_bx_persons_option_public_subscribed_me', 'checkbox', '', '', '', 31),
+('bx_persons_enable_profile_activation_letter', 'on', @iCategId, '_bx_persons_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32);
 
 -- PAGES
 

+ 1 - 0
modules/boonex/russian/data/langs/bx_organizations/ru.xml

@@ -6,6 +6,7 @@
 
 	<string name="_bx_orgs_option_autoapproval"><![CDATA[Автоматически активировать все организации после создания]]></string>
 	<string name="_bx_orgs_option_default_acl_level"><![CDATA[Уровень, назначаемый созданному профилю организации по умолчанию]]></string>
+  <string name="_bx_orgs_option_enable_profile_activation_letter"><![CDATA[Включить письмо об активации профиля]]></string>
 	<string name="_bx_orgs_option_redirect_aadd"><![CDATA[После создания организации перенаправить на]]></string>
     <string name="_bx_orgs_option_redirect_aadd_profile"><![CDATA[Страница организации]]></string>
     <string name="_bx_orgs_option_redirect_aadd_last"><![CDATA[Предыдущая страница]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_persons/ru.xml

@@ -6,6 +6,7 @@
 
 	<string name="_bx_persons_option_autoapproval"><![CDATA[Автоматически активировать всех персон после создания]]></string>
 	<string name="_bx_persons_option_default_acl_level"><![CDATA[Уровень, по умолчанию назначаемый созданному персональному профилю]]></string>
+  <string name="_bx_persons_option_enable_profile_activation_letter"><![CDATA[Включить письмо об активации профиля]]></string>
 	<string name="_bx_persons_option_redirect_aadd"><![CDATA[После создания персонального профиля перенаправить на]]></string>
 	<string name="_bx_persons_option_redirect_aadd_profile"><![CDATA[Страница профиля]]></string>
     <string name="_bx_persons_option_redirect_aadd_last"><![CDATA[Предыдущая страница]]></string>