Inconsistancy! in user table, create_dt in poll table, dt_create ========================================================================================== (FIXED)Creating a new does not store the current time in the dt_create field ========================================================================================== (FIXED)You can change the status of the root administrator (FIXED)You can change the admin/user status of the root administrator ========================================================================================== (FIXED)CBaseTpl.class: menu's
  • and
  • don't match ========================================================================================== (FIXED)can enter the same username private function usernameExists( $id, &$form, &$error_alerts, &$error_fields ) { //-- table name $tbl = self::TBL_NAME; //-- Inconsistancy! in user table, create_dt in poll table, dt_create ========================================================================================== (FIXED!)Creating a new does not store the current time in the dt_create field init $error_alerts = array(); $error_fields = array(); //-- open database CDb::open(); $cond = array(); $cond[] = CSql::clCond("username","=",$form["username"]); if ( $id ) { $cond[] = CSql::clCond("user_id","!=",$id); } $rsx = CTable::selectRec( self::TBL_NAME, array(self::ID_NAME), $cond ); //-- record exists? if ( count($rsx) ) { $lca = CEnv::locale( "user/validate" ); $error_alerts[] = $lca["err:username-exists"]; $error_fields[] = "username"; return true; } return false; } for reg_done //-- prevent username duplication if ( $this->usernameExists( 0, $form, $error_alerts, $error_fields ) ) { $data->resp['result'] = 'OK'; $data->resp['error_alerts'] = $error_alerts; $data->resp['error_fields'] = $error_fields; return; } for edit_done //-- prevent username duplication if ( $this->usernameExists( $id, $form, $error_alerts, $error_fields ) ) { $data->resp['result'] = 'OK'; $data->resp['error_alerts'] = $error_alerts; $data->resp['error_fields'] = $error_fields; return; }