示例#1
0
 /**
  * Overwrites tNG method in order to register some triggers specific to Update Users Transaction
  * @access protected
  */
 function doTransaction()
 {
     $table = $this->getTable();
     if (isset($GLOBALS['tNG_login_config']['table']) && $GLOBALS['tNG_login_config']['table'] == $table) {
         // BEFORE triggers
         if (isset($this->columns[$GLOBALS['tNG_login_config']['password_field']])) {
             if ($GLOBALS['tNG_login_config']['password_encrypt'] == "true") {
                 $this->registerTrigger("BEFORE", "Trigger_UpdatePassword_EncryptPassword", 200);
             }
             $this->registerTrigger("BEFORE", "Trigger_UpdatePassword_RemovePassword", 210);
             $this->registerTrigger("AFTER", "Trigger_UpdatePassword_AddPassword", -100);
             if ($GLOBALS['tNG_login_config']['password_encrypt'] == "true") {
                 $this->registerTrigger("AFTER", "Trigger_UpdatePassword_RestorePassword", -90);
             }
             $this->registerTrigger("ERROR", "Trigger_UpdatePassword_AddPassword", -100);
             $this->registerTrigger("ERROR", "Trigger_UpdatePassword_RemoveOldPassword", -90);
         }
         $this->registerTrigger("AFTER", "Trigger_Update_RefreshSession", 200);
     }
     parent::doTransaction();
 }
示例#2
0
 /**
  * Overwrites tNG method in order to register some triggers specific to Register Transaction
  * @access protected
  */
 function doTransaction()
 {
     $table = $this->getTable();
     if (isset($GLOBALS['tNG_login_config']['table']) && $GLOBALS['tNG_login_config']['table'] == $table) {
         // BEFORE triggers
         $this->registerTrigger("BEFORE", "Trigger_Registration_CheckUniqueUsername", 200);
         $this->registerTrigger("BEFORE", "Trigger_Registration_CheckPassword", 210);
         if ($GLOBALS['tNG_login_config']['password_encrypt'] == "true") {
             $this->registerTrigger("BEFORE", "Trigger_Registration_EncryptPassword", 220);
         }
         if ($GLOBALS['tNG_login_config']['activation_field'] != "") {
             $this->registerTrigger("BEFORE", "Trigger_Registration_PrepareActivation", 230);
         }
         if (isset($GLOBALS['tNG_login_config']['registration_date_field']) && $GLOBALS['tNG_login_config']['registration_date_field'] != '' || isset($GLOBALS['tNG_login_config']['max_tries_field']) && $GLOBALS['tNG_login_config']['max_tries_field'] != '' || isset($GLOBALS['tNG_login_config']['max_tries_disabledate_field']) && $GLOBALS['tNG_login_config']['max_tries_disabledate_field'] != '') {
             $this->registerTrigger("BEFORE", "Trigger_Registration_PrepareRegExtrFields", 240);
         }
         // AFTER triggers
         if ($GLOBALS['tNG_login_config']['password_encrypt'] == "true") {
             $this->registerTrigger("AFTER", "Trigger_Registration_RestorePassword", -10);
         }
         $this->registerTrigger("AFTER", "Trigger_Registration_AddDynamicFields", -5);
     }
     parent::doTransaction();
 }