# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 moremember.pl
=cut
use strict;
+#use warnings; FIXME - Bug 2505
use CGI;
use C4::Context;
use C4::Auth;
$_->{relatedto} = findrelatedto( $_->{type}, $_->{externalid} );
}
+my $candeleteuser;
+my $userenv = C4::Context->userenv;
+if($userenv->{flags} % 2 == 1){
+ $candeleteuser = 1;
+}elsif ( C4::Context->preference("IndependantBranches") ) {
+ $candeleteuser = ( $data->{'branchcode'} eq $userenv->{branch} );
+}else{
+ if( C4::Auth::getuserflags( $userenv->{flags},$userenv->{number})->{borrowers} ) {
+ $candeleteuser = 1;
+ }else{
+ $candeleteuser = 0;
+ }
+}
+
# check to see if patron's image exists in the database
# basically this gives us a template var to condition the display of
# patronimage related interface on
detailview => 1,
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ CANDELETEUSER => $candeleteuser,
roaddetails => $roaddetails,
borrowernumber => $borrowernumber,
categoryname => $data->{'description'},