mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Working on adding user to another company
This commit is contained in:
parent
52bf4afd64
commit
bf326e6d26
@ -39,9 +39,9 @@ class StoreUserRequest extends Request
|
||||
$rules['last_name'] = 'required|string|max:100';
|
||||
|
||||
if (config('ninja.db.multi_db_enabled')) {
|
||||
$rules['email'] = ['email', new ValidUserForCompany(), Rule::unique('users')->ignore($this->input('company_user.account.id'), 'account_id')];
|
||||
$rules['email'] = ['email', new ValidUserForCompany(), Rule::unique('users')->ignore(auth()->user()->company()->account_id, 'account_id')];
|
||||
} else {
|
||||
$rules['email'] = ['email',Rule::unique('users')->ignore($this->input('company_user.account.id'), 'account_id')];
|
||||
$rules['email'] = ['email',Rule::unique('users')->ignore(auth()->user()->company()->account_id, 'account_id')];
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +56,10 @@ class StoreUserRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
nlog($this->input('company_user.account'));
|
||||
//unique user rule - check company_user table for user_id / company_id / account_id if none exist we can add the user. ELSE return false
|
||||
|
||||
//nlog($this->all());
|
||||
//nlog($this->input('company_user.account'));
|
||||
// nlog($this->input('company_user.account.id'));
|
||||
// nlog($this->input('company_user.account.id'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user