edit api for login
This commit is contained in:
@@ -28,6 +28,11 @@ class UsersController < ApplicationController
|
||||
@user = User.new(user_params)
|
||||
email=params[:registered_email]
|
||||
@user.is_active=true
|
||||
cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
|
||||
key=cipher.random_key
|
||||
secrect_key= Base64.encode64(key)
|
||||
@user.secrect_key=secrect_key
|
||||
|
||||
respond_to do |format|
|
||||
if @user.save
|
||||
member_id= current_member.id
|
||||
@@ -50,6 +55,7 @@ class UsersController < ApplicationController
|
||||
# PATCH/PUT /users/1
|
||||
# PATCH/PUT /users/1.json
|
||||
def update
|
||||
|
||||
respond_to do |format|
|
||||
if @user.update(user_params)
|
||||
format.html { redirect_to @user, notice: 'User was successfully updated.' }
|
||||
|
||||
Reference in New Issue
Block a user