I actually figured it out after a while. I made the mistake to work with wixUsers instead of wixUsersBackend. From there it was pretty simple. I just added this line to the backend file:
import wixUsersBackend from ‘wix-users-backend’ ;
export function Stories_beforeInsert ( item , context ) {
item . userReference = wixUsersBackend . currentUser . id ;
return item ;
}
Thanks again for your help ![]()
Greetings