Beispiel #1
0
 public function handle($stanza, $parent = false)
 {
     $jid = current(explode('/', (string) $parent->attributes()->from));
     $cd = new \Modl\ContactDAO();
     $c = $cd->get($jid);
     if (isset($stanza->items->item->metadata->info)) {
         $info = $stanza->items->item->metadata->info->attributes();
         if ($info->id != $c->avatarhash) {
             $c->avatarhash = $info->id;
             $cd->set($c);
             $g = new Get();
             $g->setTo($jid)->request();
         }
     }
 }
Beispiel #2
0
 function ajaxGetAvatar()
 {
     $r = new Get();
     $r->setTo($this->user->getLogin())->setMe()->request();
 }