Closed luke- closed 1 year ago
@luke- PR https://github.com/humhub/rest/pull/111: Please note on previous version the core scenario User::SCENARIO_EDIT_ADMIN
was used from REST API side for add and update user, in order to don't touch the core scenario I decided to extend the model User
from REST module side with new model ApiUser
.
If you don't like such wrapper/extenssion please let me know, and otherwise we should modify a core side in order to either add fields into the existing scenario or create new one with name like SCENARIO_API_REQUEST = 'apiRequest
, but I am not sure it is a good idea to mix a code from module with core code.
@yurabakhtin Thanks, the Wrapper Solution is good in this case.
It should be possible to specify the following optional
account
fields when creating a user:authclient
referes touser.auth_mode
authclient_id
referes touser.authclient_id
.https://github.com/humhub/rest/blob/master/definitions/UserDefinitions.php#L51
These are also to be returned.
/user/get-by-username
, there should also be a/user/get-by-authclient
.This should find the user by the parameters
name
of the authclient (user.auth_mode
) andid
value ofuser.authclient_id
.