From 2bb1dd5adf9121a20e6c2f568720b1fd564d2656 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 24 Feb 2010 12:51:43 +1300 Subject: [PATCH] Don't display a grant edit until a user is created. Removes an unsightly SQL error from the logs, but it also isn't reasonable to be granting privileges until the principal record exists to do the granting! --- inc/ui/principal-edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/ui/principal-edit.php b/inc/ui/principal-edit.php index cc6ef904..cf8aa1db 100644 --- a/inc/ui/principal-edit.php +++ b/inc/ui/principal-edit.php @@ -529,7 +529,7 @@ if ( $can_write_principal ) { if ( isset($_GET['edit_grant']) ) { $browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row'); } - else { + else if ( isset($id ) ) { $browser->RowFormat( '', '', '#even' ); $extra_row = array( 'to_principal' => -1 ); $browser->MatchedRow('to_principal', -1, 'edit_grant_row');