[eluser]WanWizard[/eluser]
After you have saved the object, the insert id (if supported by the database driver used) will be assigned to the id property.
Code:
$user = new User();
$user->name = 'John';
$user->save();
echo "John was saved with id ", $user->id;