Update affiliate.php

Fix: Call to a member function getTotalLoginAttempts() on a non-object
Fix: Undefined index: store_id in admin/controller/setting/store.php