Discussions
Same user as a customer and vendor
I'm working on an application that gives users the ability to purchase items as a customer and list items as a vendor. This means one user can have both roles and this user should be able to log in with one username and password.
It seems that Netsuite requires that I create 2 records - a customer record and a vendor record. I'm not happy about that but I can deal with that. The problem is that since they have the same email address only one of these record types can have a valid password to authenticate against.
So I can check their username and password but I don't know ahead of time if their role is customer or vendor which means that I would have to attempt to login with a customer role first and if that gets a permissions error I'll then have to try and authenticate with the vendor role to get them in. Is there any way around this? This really makes things ugly for (and complicated) in several areas of the site.