• AuraDev
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi Guys, I need to write a PHP script and dont want to start from scratch.

What I'm looking for is a script that takes a username and password (that is entered on a form), and checks to see if that user/pass exists in our SalesForce customer database, but also checks a third field which defines whether or not they are a subscriber.

So:

<Connect to salesforce>

<Select Customer where user = x>
    If {user doesnt exist -> return to login and show error: user does not exist}
    If {user.pass doesnt = y -> return to login and show error: invalid password}
   
// Check subscription status
    If {customer.subscription_status = inactive -> return to login and show error: Subscription Inactive}

else { Set session var for username and log the customer into the website}


Anyone have something like this sitting around?

Thanks,
Chris