예제 #1
0
파일: SASL.php 프로젝트: movim/moxl
 public function handle($stanza, $parent = false)
 {
     $mec = (array) $stanza->mechanism;
     /*
      * Weird behaviour on old eJabberd servers, fixed on the new versions
      * see https://github.com/processone/ejabberd/commit/2d748115
      */
     if (isset($parent->starttls) && isset($parent->starttls->required)) {
         return;
     }
     $session = \Session::start();
     $user = $session->get('username');
     if ($user) {
         if (!is_array($mec)) {
             $mec = array($mec);
         }
         $mecchoice = str_replace('-', '', \Moxl\Auth::mechanismChoice($mec));
         $session->set('mecchoice', $mecchoice);
         \Moxl\Utils::log("/// MECANISM CHOICE " . $mecchoice);
         if (method_exists('\\Moxl\\Auth', 'mechanism' . $mecchoice)) {
             call_user_func('Moxl\\Auth::mechanism' . $mecchoice);
         } else {
             \Moxl\Utils::log("/// MECANISM CHOICE NOT FOUND");
         }
     } else {
         $g = new Get();
         $g->setTo($session->get('host'))->request();
     }
 }
예제 #2
0
파일: Account.php 프로젝트: Trim/movim
 function ajaxGetRegistration($server)
 {
     if (!$this->validateServer($server)) {
         return;
     }
     $da = new Get();
     $da->setTo($server)->request();
 }
예제 #3
0
파일: Register.php 프로젝트: Hywan/moxl
 public function handle($stanza, $parent = false)
 {
     $sessx = \Sessionx::start();
     $user = $sessx->user;
     if (!isset($user)) {
         $r = new Get();
         $r->request();
     }
 }