Fix user count

This commit is contained in:
Zach Copley 2010-01-13 17:52:25 +00:00
parent 6c8bf36fe1
commit dda7a52645

View File

@ -194,10 +194,13 @@ class ShowApplicationAction extends OwnerDesignAction
$defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess) $defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess)
? 'read-write' : 'read-only'; ? 'read-write' : 'read-only';
$profile = Profile::staticGet($this->application->owner); $profile = Profile::staticGet($this->application->owner);
$userCnt = 0; // XXX: count how many users use the app
$appUsers = new Oauth_application_user();
$appUsers->application_id = $this->application->id;
$userCnt = $appUsers->count();
$this->raw(sprintf( $this->raw(sprintf(
_('Created by %1$s - %2$s access by default - %3$d users.'), _('created by %1$s - %2$s access by default - %3$d users'),
$profile->getBestName(), $profile->getBestName(),
$defaultAccess, $defaultAccess,
$userCnt $userCnt