diff --git a/app/models/user.rb b/app/models/user.rb index 6a76ce772..ddb8036fe 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -286,9 +286,13 @@ class User ###Helpers############ def self.instantiate!( opts = {} ) - opts[:person][:diaspora_handle] = "#{opts[:username]}@#{URI::parse(opts[:url]).host}" + hostname = opts[:url].gsub(/(https?:|www\.)\/\//, '') + hostname.chop! if hostname[-1, 1] == '/' + + opts[:person][:diaspora_handle] = "#{opts[:username]}@#{hostname}" + puts opts[:person][:diaspora_handle] opts[:person][:serialized_key] = generate_key - User.create!(opts) + User.create(opts) end def seed_aspects @@ -296,10 +300,6 @@ class User aspect(:name => "Work") end - def self.create(opts ={}) - puts opts.inspect - end - def terse_url terse = self.url.gsub(/(https?:|www\.)\/\//, '') terse = terse.chop! if terse[-1, 1] == '/'