Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

people need a user account on my site to be able to download a plugin. I want to add an activation function in the plugin so a user must supply their username and password the first time they use the plugin to make sure that they have a valid user account on my site before they can use it

what is the simplest way to remotely check a username and password to see if it valid or not from within a php file?

I don't want to enable xml rpc on the site.

share|improve this question
add comment

1 Answer

Its nonsensical to lock activation, unless the functional part of your code remains on your site. You essentially can make a service that you hide behind a login or apikey (like akismet) which may or may not make sense for your plugin.

Calling home for permission to activate is a terrible idea, because idealistically, it's a violation of the GPL (won't earn you any fans or loyalty), and pragmatically, the client can easily change the code to not require the permission (won't earn you any money either).

You could deny auto-updates and support behind a support contract, but that's different isn't it? In that case you cache the login info into an option and transmit that back you your server each time it requests the update zip. Your server checks the validity of the info before sending the update archive.

share|improve this answer
    
This (API key for updates) is what Relevanssi Premium does, and it works very well. It's not difficult to implement, either - there's a great example in Professional Wordpress Plugin Development (which every plugin dev should read). ACF takes the first approach, and anyone can unlock the paid features by changing a couple lines of code - without violating the license agreement. It works for him because his primary audience isn't likely to know how to do so. –  SickHippie Mar 30 '12 at 20:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.