redirection to login page after creating new user, account validation done, fill in all languages for names also done plus the name error in the backend for noname or half filled profile is also fixed
This commit is contained in:
parent
f32692c20a
commit
0338557a33
|
@ -29,7 +29,6 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
def site_restart
|
||||
Resque.enqueue(RestartServer)
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ class BasicInfosController < ApplicationController
|
|||
def role_update
|
||||
user = User.find(params[:id])
|
||||
if user.update_attributes(params[:user])
|
||||
redirect_to root_path
|
||||
redirect_to "/users/sign_in"
|
||||
else
|
||||
@roles = Role.where(:disabled => false)
|
||||
render :action => "role_page"
|
||||
|
|
|
@ -60,14 +60,25 @@ class FacebookController< ApplicationController
|
|||
if data["success"]
|
||||
user = JSON.parse(data["user"])
|
||||
u = User.find(current_user.id)
|
||||
u.first_name = user["first_name"]
|
||||
u.last_name = user["last_name"]
|
||||
firstname = {}
|
||||
lastname = {}
|
||||
@site_valid_locales.each do |locale|
|
||||
firstname[locale] = user["first_name"]
|
||||
lastname[locale] = user["last_name"]
|
||||
end
|
||||
u.first_name_translations = firstname
|
||||
u.last_name_translations = lastname
|
||||
u.office_tel = user["phone"]
|
||||
u.email = user["email"]
|
||||
# u.email = "xyz@zyx.com"
|
||||
u.sex = user["gender"] || "unknown"
|
||||
u.remote_avatar_url = user["picture"] if user["picture"]
|
||||
u.save!
|
||||
if u.save
|
||||
render :json=>{"success"=>true,"user"=>user}.to_json
|
||||
else
|
||||
render :json=>{"success"=>false,"message"=>"Email already occupied."}.to_json
|
||||
end
|
||||
|
||||
else
|
||||
render :json=>{"success"=>false,"message"=>data["message"]}.to_json
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to user_for_listing.name,admin_users_new_interface_path(user_for_listing) %>
|
||||
<%= link_to (user_for_listing.name ? user_for_listing.name : user_for_listing.user_id),admin_users_new_interface_path(user_for_listing) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<%= content_tag(:li, link_to(t(:edit),edit_admin_users_new_interface_path(user_for_listing))) if is_admin? %>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<%= image_tag(user_for_summary.avatar) %>
|
||||
</div>
|
||||
<div class="member-info">
|
||||
<h4 class="member-name"><%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%></h4>
|
||||
<h4 class="member-name"><%= link_to (user_for_summary.name ? user_for_summary.name : user_for_summary.user_id),admin_users_new_interface_path(user_for_summary)%></h4>
|
||||
<div class="member-mail muted"><%= user_for_summary.email%></div>
|
||||
<hr>
|
||||
<ul class="member-roles">
|
||||
|
|
|
@ -18,5 +18,5 @@
|
|||
</div>
|
||||
<%= image_tag(user_for_thumbnail.avatar) %>
|
||||
</div>
|
||||
<h4 class="member-name text-center"><%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%></h4>
|
||||
<h4 class="member-name text-center"><%= link_to (user_for_thumbnail.name ? user_for_thumbnail.name : user_for_thumbnail.user_id),admin_users_new_interface_path(user_for_thumbnail)%></h4>
|
||||
</li>
|
|
@ -28,7 +28,7 @@
|
|||
timeInterval = setInterval(function(){
|
||||
if( facebookWindow.closed ){
|
||||
clearInterval(timeInterval);
|
||||
$(".msg").removeClass('hide').find("h4").text("Importing,please wait...");
|
||||
$(".msg").removeClass('hide alert-danger').find("h4").text("Importing,please wait...");
|
||||
$.ajax({
|
||||
url : "/facebook/profile_import",
|
||||
data : {"user_id":"<%= @user.id.to_s %>"},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"type": "sftp",
|
||||
|
||||
"save_before_upload": true,
|
||||
"upload_on_save": false,
|
||||
"upload_on_save": true,
|
||||
"sync_down_on_open": false,
|
||||
"sync_skip_deletes": false,
|
||||
"confirm_downloads": false,
|
||||
|
|
Loading…
Reference in New Issue