Skip to content

Commit

Permalink
Move anonymous user verification to Check loop
Browse files Browse the repository at this point in the history
Issue #11316
  • Loading branch information
dregad committed Mar 7, 2016
1 parent b694c14 commit a625150
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bug_monitor_add.php
Expand Up @@ -60,9 +60,6 @@
$t_logged_in_user_id = auth_get_current_user_id();

if( is_blank( $f_usernames ) ) {
if( user_is_anonymous( $t_logged_in_user_id ) ) {
trigger_error( ERROR_PROTECTED_ACCOUNT, E_USER_ERROR );
}
$t_user_ids = array( $t_logged_in_user_id );
} else {
$t_usernames = preg_split( '/[,|]/', $f_usernames, -1, PREG_SPLIT_NO_EMPTY );
Expand All @@ -79,9 +76,7 @@
trigger_error( ERROR_USER_BY_NAME_NOT_FOUND, E_USER_ERROR );
}
}
if( user_is_anonymous( $t_user_id ) ) {
trigger_error( ERROR_PROTECTED_ACCOUNT, E_USER_ERROR );
}

$t_user_ids[$t_user_id] = $t_user_id;
}
}
Expand All @@ -96,6 +91,10 @@

# Check all monitors first,
foreach( $t_user_ids as $t_user_id ) {
if( user_is_anonymous( $t_user_id ) ) {
trigger_error( ERROR_PROTECTED_ACCOUNT, E_USER_ERROR );
}

if( $t_logged_in_user_id == $t_user_id ) {
access_ensure_bug_level( config_get( 'monitor_bug_threshold' ), $f_bug_id );
} else {
Expand Down

0 comments on commit a625150

Please sign in to comment.