How to return the user_id from the Joomla-Framework on insert/update a (new) user
问题 I try to insert/update a new user to a joomla page from an external script. The following code works very well. However I'll need the user_id of the added or updated user but the script returns just "useractivate". The Joomla Forum/Documentation (https://github.com/joomla/joomla-cms/issues/9644) suggests to use $db->insertid(); But I was not able to get this work. Up to now I tried this: $db = JFactory::getDbo(); var_dup($db->insertid()); and get the result: 0 User Creation <?php define( '