MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: removing user from userdb



******    message to minivend-users from "Gideon van Gelder" <gideon@swingmaster.nl>     ******

Add this to userdb.pm:

sub delete_username {

 my $self;

 $self = shift
  if ref $_[0];

 my(%options) = @_;

 eval {
  unless($self) {
   $self = new Vend::UserDB %options;
  }

  die "Bad object.\n" unless defined $self;

  my $pass = $self->{DB}->delete_record(
      $self->{USERNAME}
      );
  die "Database access error.\n" unless defined $pass;
  $self->log('delete username') if $options{'log'};
 };

 if($@) {
  if(defined $self) {
   $self->{ERROR} = $@;
   $self->log('delete username failed') if $options{'log'};
  }
  else {
   logError( errmsg('UserDB.pm:3', "Vend::UserDB error: %s", $@ ) );
  }
  return undef;
 }

Add to sub userdb:

elsif($function eq 'delete_username') {
    $user = new Vend::UserDB %options;
    unless (defined $user) {
   $Vend::Session->{failure} = "Unable to access user database.";
   return undef;
  }
  if($status = $user->delete_username(%options)) {
  }
 }
1;
}

You can call this function with [userdb delete_username].

First set all the userdb vars for the user to "" and then call this function
to also delete the username itself.

Good luck,

-Gideon


> ******    message to minivend-users from Andreas Kotowicz
<koto@mynetix.de>     ******
>
> Hi all,
>
> does anyone know how to remove an user from the userdb file? the "erase
all
> information" button on the canceled page doesn't work for me.
>
> Anyone a hint?
>
>
> Andreas
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: