Frank Vèssia Posted March 27, 2011 Share Posted March 27, 2011 I cannot find in documentation a way to delete a user from code. Link to comment Share on other sites More sharing options...
apeisa Posted March 27, 2011 Share Posted March 27, 2011 Have you tried $users->delete($user)? Where $user is actual $user object (not username). So probably something like this: $u = $users->get('username'); $users->delete($u); Documentation for $users is missing and probably will be until Ryan finishes his work building the new user management. Link to comment Share on other sites More sharing options...
ryan Posted March 28, 2011 Share Posted March 28, 2011 Apeisa's example is correct. Thanks, Ryan Link to comment Share on other sites More sharing options...
benbyf Posted March 4, 2017 Share Posted March 4, 2017 how is this done when the user you want to delete is the user logged in? It seems to error and I cann't get my head around how I might change them to guest aftwards etc? Any help would be ace Link to comment Share on other sites More sharing options...
LostKobrakai Posted March 4, 2017 Share Posted March 4, 2017 You'd want to do a $session->logout() before deleting the user. 2 Link to comment Share on other sites More sharing options...
benbyf Posted March 4, 2017 Share Posted March 4, 2017 Thanks @LostKobrakai that was a swift awser and works well. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now