Creating users from scripts

The script allows you to create users and assign them the user role.

Download file create-users_okm.xlsx


The string "newId" is the user Id what will be set.

The string "newPassword" is the user password what will be set.

The string "newMail@mail.com" is the user mail what will be set.

The string "newRealName" is the user real name what will be set.

import com.openkm.api.*;

OKMAuth.getInstance().createUser(null, "newId","newPassword", "newMail@mail.com","New Real Name", true);
OKMAuth.getInstance().assignRole(null, "user1", "ROLE_USER");