From b1263a1cd088dd72a56a7a96fa5687e2359ceb03 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 28 May 2019 20:03:53 +0800 Subject: [PATCH] 1 --- app/services/cnmoocs_service.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/services/cnmoocs_service.rb b/app/services/cnmoocs_service.rb index 3a68055d..a7605110 100644 --- a/app/services/cnmoocs_service.rb +++ b/app/services/cnmoocs_service.rb @@ -153,4 +153,10 @@ class CnmoocsService end {resouces: shixun_list} end + + # 为新创建的用户随机生成以m为前缀的用户名,m表示该用户是用邮箱注册 + def generate_login(login_pre) + us = UsersService.new + us.generate_user_login(login_pre) + end end \ No newline at end of file