public static function getCountNadisl() { $modelPracivnuku = new Pracivnuku(); $sender_pracivnuku_id = $modelPracivnuku->getUserId(); $arr = self::model()->findAll("sender_pracivnuku_id='{$sender_pracivnuku_id}'"); return count($arr); }
public function selectPermissionsPracivnuk() { $modelPrac = new Pracivnuku(); $id_pracivnuk = $modelPrac->getUserId(); $access = Permissions::model()->find("id_pracivnuk='{$id_pracivnuk}'"); if (is_object($access)) { $permissionArray = array(); foreach ($access as $k => $v) { $permissionArray[$k] = $v; } $_SESSION['permissions'] = $permissionArray; } }