registration

Add a terms and conditions checkbox in Woocommerce registration form

喜夏-厌秋 提交于 2019-11-29 05:14:06
In woocommerce registration form, there's no "terms and conditions" before sign up button. Is there a way to make it appears in the form? Here is the link of my theme layout . Updated on july 2018 - Added compatibility for Woocommerce version 3.4+ If not done yet, first you need enable terms and conditions on checkout page: To create a new page in Wordpress for your terms and conditions To enable that page in Woocommerce > Settings > Checkout > Checkout pages (section) : Then save… you are done. The code to get the term and conditions check box on registration form: // Add term and conditions

Configuring django-userena

夙愿已清 提交于 2019-11-29 04:01:12
for my new project I decided to use django-userena I followed the instructions from userena docs . However I'm getting this error : SiteProfileNotAvailable at /accounts/signin/ No exception supplied and don't know how to fix it. Please help ! You usually get a SiteProfileNotAvailable when Django can't find your profile. As documented in the " Storing additional information about users ", you need to define AUTH_PROFILE_MODULE to point to the model of you profile. As wunki has aptly pointed out, it's important to define the AUTH_PROFILE_MODULE in your settings.py file to point to your subclass

Devise: Allow admins to edit other users - Rails

会有一股神秘感。 提交于 2019-11-28 23:17:30
I'm trying to allow an admin user to edit other users in Devise, but when I try to access an edit page for another user (e.g. /users/1/edit), I get the following message: Unknown action Could not find devise mapping for path "/users/1/edit" The only path that seems to work is /users/edit, which shows the edit page for the current user. In my routes file I have: devise_for :users, :controllers => { :registrations => 'users' } resources :users Any ideas? Thanks! I've had to do this as well, and it's not currently built into devise. Since the answer most upvoted has a dead link, I thought I'd

What is the best way to ban/block users with Devise for Rails?

泄露秘密 提交于 2019-11-28 23:01:34
问题 I'm using Devise for authentication in my rails app and I'd like to be able to block certain accounts and prevent users from reregistering with a blocked email. I'm just not sure what the best way is to go about it. My first thought was to override the sessions and registrations controllers to check the model for a user with a blocked bit, but I have a feeling there might be a more elegant way. 回答1: I would do it like this: def after_sign_in_path_for(resource) if resource.is_a?(User) &&

Django registration and multiple profiles

元气小坏坏 提交于 2019-11-28 17:20:16
I'm using django-registration in my application. I want to create different kinds of users with different profiles. For example, one user is a teacher and another user is a student. How can I modify registration to set the user_type and create the right profile? Long answer :p I've found The Missing Manual post invaluable for this kind of problem as it explains many of features of the django-profiles and django-registration systems. I'd suggest using multi table inheritance on the single profile you're allowed to set via the AUTH_PROFILE_MODULE For instance #models.py class Profile(models

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

和自甴很熟 提交于 2019-11-28 16:29:06
问题 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. 回答1: 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

Prevent users from starting multiple accounts?

六月ゝ 毕业季﹏ 提交于 2019-11-28 15:35:52
I know that in the end it, can't be done. But, what are the options to: a) limit the options for persons to create multiple accounts, b) increase the chance of detecting multiple accounts / person for a blog-like web service? (people can sign up for their own blog) Update: I think the 'limit the options' has been answered nicely. (there is no reliable method, but we can raise the bar) However, I would still like to know what other options there are to detect multiple accounts? I'm assuming you're talking about a free service? I can't think of any ways that don't either have serious drawbacks

disabling Devise registration for production environment only

心不动则不痛 提交于 2019-11-28 14:52:41
问题 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

MailConnectException while sending mail using java mail api

家住魔仙堡 提交于 2019-11-28 14:32:35
Trying to send an email using java mail api. And I keep getting MailConnectException. I have tried multiple ways to solve it without success. Exception is thrown by this statement transport.connect("smtp.gmail.com", "someone@gmail.com", "myPassword"); Can anyone tell me what I'm doing wrong? public static void main(String[] args) { String host = "smtp.gmail.com"; String from = "someone@gmail.com"; Properties props = System.getProperties(); props.put("mail.smtp.host", host); props.put("mail.smtp.user", from); props.put("mail.smtp.password", "myPassword"); props.put("mail.smtp.port", "465");

Check if username already exists in database MySQL PHP

泪湿孤枕 提交于 2019-11-28 13:05:52
I have a registration.php page I made and I need to check if a username is already in my database so that I won't have 2 members with the same name... Here is how I am inserting the user info into the database (username, password, date of registration, etc.): mysql_query("INSERT INTO UserDb (ID, TimeStamp, UserName, Password) VALUES ('$ipaddress', NOW(), '$user_username', '$user_password')"); How can I check that database "UserDb" under the "UserName" field to make sure the user's variable "$user_username" doesn't already exist? You can make the username field in the database a primary key or