[英]Get attribute from config.php of Sentry 2 for Laravel 4
我试图在cartalyt / sentry的vendor文件夹中修改原始的User.php文件,因为我想用同一封电子邮件注册两个帐户,但是Sentry的原始代码不允许此功能,因此我在配置中添加了一个属性.php文件
/app/config/packages/cartalyst/sentry/config.php
但是我不知道如何在该文件中使用此属性:
/vendor/cartalyst/sentry/src/Cartalyst/Sentry/Users/Eloquent/User.php
因为在该文件中,我可以简单地添加一个if来检查是否要为每封电子邮件注册一个用户,或者用同一封电子邮件注册更多用户。
或者,如果您有一个更好的主意,那就很好了。
我希望你能帮帮我!
You dont need to touch that file what you should do is
**remove this**
$table->unique('email');
**from this file**
**your-app/vendor/cartalyst/sentry/src/migrations/2012_12_06_225921_migration_cartalyst_sentry_install_users.php**
That would remove the unique constraint on creating a user with one single email
Then you might need to drop the db or look for a way to re-run the migrations.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.