Index: branches/5.2.x/units/posts/post_eh.php =================================================================== diff -u -N -r14624 -r14722 --- branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 14624) +++ branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 14722) @@ -1,6 +1,6 @@ SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']); - $sql = 'SELECT Login + $sql = 'SELECT Username FROM ' . TABLE_PREFIX . 'PortalUser WHERE PortalUserId = ' . $user_id; $object->SetDBField('PosterAlias', $this->Conn->GetOne($sql)); @@ -189,7 +189,7 @@ $options_map = $post_helper->getOptionsMap(); $post_options = $object->GetDBField('Options'); - + foreach ($options_map as $option_name => $field_name) { $option_value = $post_helper->GetPostOption($option_name, $post_options); $object->SetDBField($field_name, (int)$option_value); @@ -251,7 +251,7 @@ // auto-lock topic after N number of posts (if option enabled) $auto_lock = $this->Application->ConfigValue('AutoTopicLockPosts'); - + if ( (int)$auto_lock > 0 ) { if ( $posts_count >= $auto_lock ) { // user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again