I'm developing a simple troubleshooting menu on Drupal 7 to allow users request a new password or cancel their account depending on some factor. To do so I basically call
$mail = drupal_mail('user', $op, $account->mail, $language, $params);
using the corresponding
I have a problem with the most basic thing, which is accessing the account cancellation form after sending the email with the corresponding URL. The cancellation page keeps giving me "Access denied", even if I am admin.
I checked the permissions and I've already allowed all users to "Cancel own user account", so that's discarded.
The emails are going through just fine and sending a one-time-login-link worked flawlessly. I just can't seem to open the account cancellation link.