pre_develop
daiao 6 years ago
parent b1263a1cd0
commit b252983b7d

@ -31,7 +31,6 @@ module Mobile
desc "创建用户"
params do
requires :userName, type: String, desc: "好大学用户名"
optional :name, type: String, desc: "用户姓名"
end
post "create_user" do
CnmoocsService.new.create_user params

@ -79,11 +79,12 @@ class CnmoocsService
mail = params[:email] || c_user.generate_email
name = params[:name] || "好大学_#{params[:userName]}"
login = generate_login('m')
create_params = {
lastname: name,
mail: mail,
mail_notification: mail,
login: generate_login('m'),
login: login,
password: OauthController::DEFAULT_PASSWORD,
certification: 1
}

Loading…
Cancel
Save