Merged in bugfix/HOR-2858 (pull request #5555)

HOR-2858

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2017-05-03 20:25:24 +00:00
committed by Julio Cesar Laura Avendaño
4 changed files with 34 additions and 8 deletions

View File

@@ -996,4 +996,24 @@ class WebEntryEvent
throw $e;
}
}
/**
* This function verify if a user $userUid was configure in a Web Entry and return the total of records
*
* @param string $userUid uid of a user
*
* return integer $total
*/
public function getWebEntryRelatedToUser($userUid)
{
try {
//Get data
$criteria = $this->getWebEntryEventCriteria();
$criteria->add(\WebEntryEventPeer::USR_UID, $userUid, \Criteria::EQUAL);
$total = \WebEntryEventPeer::doCount($criteria);
return $total;
} catch (\Exception $e) {
throw $e;
}
}
}