mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:同步acge用户记录在册
This commit is contained in:
@@ -33,8 +33,11 @@ class Oauth::AcgeController < Oauth::BaseController
|
||||
username = uid[0..7]
|
||||
password = SecureRandom.hex(4)
|
||||
reg_result = autologin_register(username, email, password, 'acge', phone, name)
|
||||
CSV.open("public/操作系统大赛用户信息.csv", 'wb') do |csv|
|
||||
csv << [username, email, password, phone, name]
|
||||
existing_rows = CSV.read("public/操作系统大赛用户信息.csv")
|
||||
new_row = [username, email, password, phone, name]
|
||||
existing_rows << new_row
|
||||
CSV.open("public/操作系统大赛用户信息.csv", 'w') do |csv|
|
||||
existing_rows.each { |row| csv << row }
|
||||
end
|
||||
if reg_result[:message].blank?
|
||||
open_user = OpenUsers::Acge.create!(user_id: reg_result[:user][:id], uid: uid)
|
||||
|
||||
Reference in New Issue
Block a user