Reputation: 2153
Hello PHP and Yii friends,
I think this is not a true chalenge for someone with more experience with Yii. Anny reference or general idea will mean a lot as i'm pretty new to Yii. Thanks in advance for even a view!
Scenario:
Yii web application and the problem of custom scenario of user validation based not on the existence of the user in the local database but the external site db, it's own validation and well covered public accessible API.
I consider creating the bridge module between the Yii application and external API that will provide with the data that will be used to create specific Yii models and views for member users.
However to make this models and views public only to the user/member i must create a custom validation part wit the data i get as a return type of external API validation function with a help of cUrl
.
Example data i get as a result from external API user validation:
[result] => success
[userid] => 2
[passwordhash] => 04462efbd433dbb66ca25b67145a1848ed9e1044
Question:
How can i customize Yii user validation based on the values i get in the array above?
Upvotes: 2
Views: 597
Reputation:
You'll also want to validate the user existence after signup, e.g. during each login. So you should:
CValidator
.Upvotes: 1