![]() |
|
Thread Tools |
#1
|
||||
|
||||
Deleting Users Programmatically
We have a SSO script that creates and logs users in, but I am have having trouble with the delete aspect of it. I found in the docs there is a delete method available, but when I try to use it, I get the following error thrown:
I've noticed that this error is thrown from checkHasAdminPermission, but I haven't been able to find how to authorize the API call as an admin. Any help would be appreciated. No members have liked this post.
|
#2
|
||||
|
||||
checkHasAdminPermission() is checking for a valid control panel session. You will probably need to write a new class without the admin check and use that instead.
No members have liked this post.
|
#3
|
||||
|
||||
Thanks Replicant. We ended up going with a different route. We added this code right before we run the delete call:
It's less than ideal having to put the admin creds in the file, but it was quick and easy, and served our purposes of moving onto other more important things. No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 22:48.