示例#1
0
文件: Index.php 项目: visapi/amun
 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);
     }
 }
示例#2
0
文件: Email.php 项目: visapi/amun
 public function apply($value)
 {
     return !empty($value) ? parent::apply($value) : '';
 }