Fixed CLI updates to payments and no auth instance

This commit is contained in:
Deon George 2016-04-18 20:53:09 +10:00
parent 75bcbf0856
commit f1fae0c28c

View File

@ -148,7 +148,7 @@ class Model_Payment extends ORM_OSB {
$items = $this->subitems();
// If a user modified this payment, we'll update the source to their ID.
if ($ao = Auth::instance()->get_user())
if (PHP_SAPI !== 'cli' AND $ao = Auth::instance()->get_user())
$this->source_id = $ao->id;
$this->ip = Request::$client_ip;