Since we haven't read the record yet, we can't refer to it's fields.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
Andrew McMillan 2010-12-28 00:41:33 +13:00
parent d615da9c55
commit 0041a1e331

View File

@ -74,7 +74,7 @@ function handle_subaction( $subaction ) {
dbg_error_log('admin-principal-edit',':handle_action: Deleting principal %d', $id );
if ( $session->AllowedTo('Admin') ) {
if ( isset($id) && $id > 1 && $session->CheckConfirmationHash('GET', 'confirm') ) {
dbg_error_log('admin-principal-edit',':handle_action: Allowed to delete principal %d -%s', $id, $editor->Value('username') );
dbg_error_log('admin-principal-edit',':handle_action: Allowed to delete principal %d -%s', $id );
$qry = new AwlQuery('DELETE FROM dav_principal WHERE principal_id=?', $id );
if ( $qry->Exec() ) {
$c->messages[] = i18n('Principal deleted');