registration

How can I send a welcome email to newly registered users in Rails using Devise?

感情迁移 提交于 2019-11-30 00:07:33
I am using Devise on Rails and I'm wondering if there is a hook or a filter that I can use to add a bit of code to Devise's user registration process and send a welcome email to the user after an account has been created. Without Devise it would be something like this... respond_to do |format| if @user.save Notifier.welcome_email(@user).deliver # <======= ... The next most popular answer assumes you're using using Devise's :confirmable module, which I'm not. I didn't like the other solutions because you have to use model callbacks, which will always send welcome emails even when you create his

Rails 3 with Devise for Authentication - How do I manually create a user?

随声附和 提交于 2019-11-29 23:41:31
I would like to manually create new User s, without forcing them to verify their email address. The idea is to allow existing users to automatically add their friends without requiring their registration. It makes sense for the business case I'm working to solve. How can this be achieved with Devise? The skip_confirmation! method is available to any confirmable model. @user = User.new params[:user] @user.skip_confirmation! # Sets confirmed_at to Time.now, activating the account @user.save The user account will be activated though. If you don't want that, continue reading. Devise uses

OAuth? ,OpenID? Neither? Which one should my site support?

我的未来我决定 提交于 2019-11-29 22:24:01
I working on a new website and wanted some advice/feedback on OAuth vs OpenID vs Standard site owned username/password. You may want to read this article by Malcom Tredinnick which explains what openid and oauth are, and do. They serve different purposes. In summary, openid would be used to uniquely identify users - it's an identity solution. oAuth would provide a means to interact with data that your site's users have access to by allowing the user to grant your site temporary access to external services, their flickr account, for example - it's an authorization tool. Offering only the

Saving profile with registration in Django-Registration

一个人想着一个人 提交于 2019-11-29 21:54:04
In Django-Registration it says you can save a custom profile when you save a user. But I have no idea what the documentation is asking me to do. Here is what they say: To enable creation of a custom user profile along with the User (e.g., the model specified in the AUTH_PROFILE_MODULE setting), define a function which knows how to create and save an instance of that model with appropriate default values, and pass it as the keyword argument profile_callback . This function should accept one keyword argument: user The User to relate the profile to. Can someone give me an example of the function

Easy-to-use django captcha or registration app with captcha?

梦想与她 提交于 2019-11-29 20:27:09
I want to implement user registration using captcha in Django. The workflow of django-registration app is a great, but it doesn't have captcha. What captcha would you recommend to use with it? Are there some other variants of registration+captcha or useful links on the topic? This should work with Django-1.1 and don't be too hard to install. django-registration is pretty extendable. One way to extend it is to provide a custom registration form. I'd recommend to use reCaptcha , e.g. with the widget and form field from here ( archived ). Then it is as simple as writing a custom form class and

disabling Devise registration for production environment only

痞子三分冷 提交于 2019-11-29 18:43:40
I am launching a beta site with a select group of users. I want to disable registration in the production environment only, and only for a short period of time (i.e. I don't want to nuke my registration altogether). I know I can simply hide the "sign up" link, but I suspect that hackers smarter than I can still use the RESTful routes to accomplish registrations. What's the best way to disable registration so my test/development environments still work, but production is affected? Thanks for any pointers. I've tried pointing named scopes in such a way that "sign_up" goes to "sign_in", but it

Facebook Registration Connect

倖福魔咒の 提交于 2019-11-29 17:38:33
Updade: Ok so I've fixed my previous problem (Besides the SQLinjection which I'm not sure how to patch but for now it's unimportant) however I need to get it to detect Male or Female and strip some characters from it too... This is the code I did for that I defined the variable here: $gender = $response["registration"]["gender"]; I then defined newgender here $new_gender = "F"; However I then added an if statement which was supposed to detect if it was Male and change it to "M" if($gender == "Male"){ $new_gender = "M"; } The code seems to be simply ignoring the if statement as it always

Terminating app while signing up a new user in QuickBlox from ios application

柔情痞子 提交于 2019-11-29 16:19:06
While signing up a new user in QuickBlox from ios applicaqtion with login and Password credentials, the app got crashed and the NSLog console shows the error as below, Terminating app due to uncaught exception 'BaseServiceException', reason: 'You have missed the authorization call. Please insert following code inside your application [QBRequest createSessionWithSuccessBlock:errorBlock:]; Before any other code, that uses our service, but after setup credentials. First throw call stack:( 0 CoreFoundation 0x038365e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x02ca48b6 objc_exception_throw +

Facebook API's fb:registration returning “Invalid 'client_id'” when not connected to Facebook

∥☆過路亽.° 提交于 2019-11-29 14:27:40
I'm trying to use Facebook's registration tool for my website. I would like to allow Facebook users to login seamlessly to my website, but also non-Facebook users to create an account through that unified UI. I'm using the <fb:registration> tag for that purpose. If I'm already connected to Facebook when arriving to the page, everything works as expected (the form is prefilled with information from my Facebook account). But if I'm not connected to Facebook, the following error is displayed: Invalid 'client_id'. . What am I doing wrong? Thanks very much for your help. You'll find below the HTML

How to prevent refresh page error while submitting POST form?

老子叫甜甜 提交于 2019-11-29 11:29:14
When registration form submits using POST method and when you refresh the same page then it will prompt for resubmit or resend information. How we can prevent this? Use post-redirect-get . In short: You can use ajax. You keep the same php code that you put in another file, and you post the data via ajax. You can use include a one-time random token in the form. The first time that token is submitted (with other data), an action is taken. Future submissions of the same token have no effect (or just show the same confirmation page), and submissions with blank or invalid tokens are rejected. This