Exemple #1
0
 protected function getAccount($uri)
 {
     $filter = new Filter\Email();
     $email = substr($uri, 5);
     if ($filter->apply($email) === true && substr($uri, 0, 5) == 'acct:') {
         // split mail
         list($name, $host) = explode('@', $email);
         // get account record
         $handler = $this->hm->getHandler('AmunService\\User\\Account');
         return $handler->getOneByName($name, array(), Sql::FETCH_OBJECT);
     }
 }
Exemple #2
0
 public function apply($value)
 {
     return !empty($value) ? parent::apply($value) : '';
 }