Delete user button

Hi RT Users

im trying to create a delete user button on the modify user page - i have it there
but of course no functionality.
i was looking at the Submit code in Elements for comparison.
i am a newbie to perl but have a good understanding of sql coding.
can anybody explain as to where any of the database accessing is happening
in for example the code below

at a loss

thanks alot

% if ($Reset) { %}
  % if ($AlternateLabel) { <%$AlternateCaption%>