Merge branch 'master' into hruid
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 30 Jun 2008 21:00:19 +0000 (23:00 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 30 Jun 2008 21:00:19 +0000 (23:00 +0200)
Conflicts:
include/user.func.inc.php
include/vcard.inc.php

Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
1  2 
include/user.func.inc.php
include/vcard.inc.php
modules/lists.php
modules/profile.php
modules/xnetgrp.php

@@@ -241,16 -197,27 +241,28 @@@ function get_users_login_list($members
          if (strlen(trim($members)) == 0) {
              return null;
          }
-         $members = explode(' ', $members);
+         $members = split("[; ,\r\n\|]+", $members);
      }
 +
      if ($members) {
          $list = array();
          foreach ($members as $i => $alias) {
 -            if (($login = get_user_forlife($alias, $callback)) !== false) {
+             $alias = trim($alias);
+             if (empty($alias)) {
+                 continue;
+             }
 +            if (($login = get_user_login($alias, $get_forlife, $callback)) !== false) {
                  $list[$i] = $login;
-             } else if(!$strict) {
+             } else if (!$strict) {
                  $list[$i] = $alias;
+             } else {
+                 global $globals;
+                 if (strpos($alias, '@') !== false) {
+                     list($user, $dom) = explode('@', $alias);
+                     if ($dom != $globals->mail->domain && $dom != $globals->mail->domain2) {
+                         $list[$i] = $alias;
+                     }
+                 }
              }
          }
          return $list;
@@@ -36,8 -36,11 +36,11 @@@ class VCardIterator implements PlIterat
  
      public function add_user($user)
      {
-         $this->user_list[] = User::get($user);
-         $this->count++;
 -        $forlife = get_user_forlife($user, '_silent_user_callback');
 -        if ($forlife) {
 -            $this->user_list[] = get_user_forlife($user);
++        $user = User::getSilent($user);
++        if ($user) {
++            $this->user_list[] = $user;
+             $this->count++;
+         }
      }
  
      public function first()
Simple merge
Simple merge
Simple merge