diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index 9788f7641..88a7ba1c6 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -238,21 +238,17 @@ class Application_Model_User return $user; } - public static function getUsers($type, $search=null) + public static function getUsers(array $type, $search=null) { $con = Propel::getConnection(); $sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs "; $sql = $sql_gen; - if (is_array($type)) { - for ($i=0; $iid); - } catch (Exception $e) { - //we get here if $userinfo->id is defined, but doesn't exist - //in the database anymore. - Zend_Auth::getInstance()->clearIdentity(); - - return null; - } + } + try { + return new self($userinfo->id); + } catch (Exception $e) { + //we get here if $userinfo->id is defined, but doesn't exist + //in the database anymore. + Zend_Auth::getInstance()->clearIdentity(); + return null; } } }