# Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: ForumUserDeleteForm.pm,v 1.5 2012/01/05 17:55:09 schellj Exp $ package Bivio::Biz::Model::ForumUserDeleteForm; use strict; use Bivio::Base 'Bivio::Biz::Model::RealmUserDeleteForm'; our($VERSION) = sprintf('%d.%02d', q$Revision: 1.5 $ =~ /\d+/g); sub execute_ok { my($self) = @_; my($req) = $self->get_request; my(@res) = shift->SUPER::execute_ok(@_); #TODO: Need to look at other children such as CalendarEvent _down($self) unless $self->in_error || !$self->unsafe_get('User.user_id'); return @res; } sub internal_initialize { my($self) = @_; return $self->merge_initialize_info($self->SUPER::internal_initialize, { version => 1, other => [ { name => 'realm', type => 'ForumName', constraint => 'NONE', }, ], }); } sub _down { my($self) = @_; $self->new_other('Forum')->do_iterate( sub { $self->execute($self->get_request, { 'User.user_id' => $self->get('User.user_id'), 'RealmUser.realm_id' => b_debug(shift->get('forum_id')), }); return 1; }, 'unauth_iterate_start', 'forum_id', {parent_realm_id => $self->get('RealmUser.realm_id')}, ); return; } 1;