Creating users from scripts
The script allows you to create users and assign them the user role.
Download the file create-users_okm.xlsx
import com.openkm.util.ContextWrapper;import com.openkm.api.OKMAuth;import com.openkm.bean.User;
OKMAuth okmAuth = ContextWrapper.getContext().getBean(OKMAuth.class);User user = new User("newId", "newPassword", "newMail@mail.com", "New Real Name", true);okmAuth.createUser(null, user);okmAuth.assignRole(null, user.getId(), "ROLE_USER");