DB user table email required

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

DB user table email required

Post by kuoyehs » 09 Oct 2019, 09:58

My project has multiple way to register, ex: email, facebook, mobile, but in aimeos email in user table is required. How can I set the mail to nullable when I only want user to register and login using facebook or mobile phone?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: DB user table email required

Post by aimeos » 09 Oct 2019, 11:41

Which integration are you using? In Laravel for example, the e-mail is required and I don't know if you can change that.

Aimeos is using the e-mail address by default because it's required for sending order confirmation e-mails. If you want to sell something, you have to retrieve the e-mail address of the user (e.g. from Facebook) or request it directly from the user.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: DB user table email required

Post by kuoyehs » 14 Oct 2019, 03:48

The order confirmation can show on my website or app, and not send e-mail.

Because the database use the same user table, the user table in my project has set mail to nullable, I want to know aimeos how to set mail nullable.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: DB user table email required

Post by aimeos » 14 Oct 2019, 15:43

You can change the definition of the email column in the users table to allow NULL values (https://aimeos.org/docs/Developers/Libr ... ing_tables) but e.g. the admin interface treats that column as required. Not sure if it wouldn't be easier to add a fake e-mail address instead.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: DB user table email required

Post by kuoyehs » 16 Oct 2019, 08:33

./lib/custom/setup/default/schema/ don't have file to change column on user table.

Image

Image

But the method has to change package, how to set column on "config/shop.php" or other method ex: extension?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: DB user table email required

Post by aimeos » 17 Oct 2019, 07:33

The ai-laravel extension defines the columns for the "users" table:
https://github.com/aimeos/ai-laravel/bl ... stomer.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply