• Resolved jduffell

    (@jduffell)


    Hi,

    I’ve created a site which allows users to register and purchase a premium account using custom fields it simply stores the value ‘premium’ within a custom field on registration, what I’m trying to achieve is if two users using the same domain name so [email protected] & [email protected] are on the site and one of them has a premium account, is there a way so that the other user is able to reference other users using ‘user_email’ to see if anyone else from the same company has purchased a premium account, therefor via my template granting them the same site permissions as the premium user.

    Any pointers here appreciated. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    You can use preg_match to see if two users use the same domain name.
    But that don’t mean that they are working in the same company.
    If the domain name is gmail.com or yahoo.com ?

    You can use another method, asking users theire company names during registration.
    With this method, the company name should be unique so that you can use it as an ID.

    Moderator bcworkz

    (@bcworkz)

    It’s also conceivable that a premium user may not wish any random coworker to access their premium content. You could allow premium users to white list individuals or optionally allow all by email domain, but I think it’s a mistake to automatically grant access to others. You could even implement the equivalent of a “friend request” scheme to let individuals request premium access.

    It’s your site, you may do as you wish. My only advice is when it comes to personal information and privacy, tread very carefully.

    Thread Starter jduffell

    (@jduffell)

    cheers for all the suggestions, good point about generic email addresses, it’s for a fairly closed site, and all I’m really trying to do is see if a related user has a value in one particular field, so shouldn’t really be pinching any other user data.

    Cheeers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User relationships based on domain’ is closed to new replies.