LimeSurvey: master 79e2ffe1

Author Committer Branch Timestamp Parent
sitawit sitawit master 2014-09-01 07:34:45 master 94e6011e
Changeset

Update token.php to fix 'token' validation error

According to:
http://www.yiiframework.com/doc/api/1.1/CModel#validate-detail

Using string in validation function will make the framework validates all attributes which in misleading validation errors.
In this case if 'Token' model has other validation errors for example email error, LimeSurvey will throw 'Failed to create unique token in 10 attempts.'. This will lead user to think it is about 'token' attribute.

So changing into array is a must so the function ,generateToken(), will perform what it is designed for.

mod - application/models/Token.php Diff File