| @@ 26-37 (lines=12) @@ | ||
| 23 | ||
| 24 | class Public_Wall_Updates |
|
| 25 | { |
|
| 26 | private function getAdminModerators() |
|
| 27 | { |
|
| 28 | global $xoopsDB, $xoopsUser; |
|
| 29 | $sql = 'SELECT userid |
|
| 30 | FROM ' . $xoopsDB->prefix('smallworld_user') . ' su |
|
| 31 | LEFT JOIN ' . $xoopsDB->prefix('groups_users_link') . ' xu ON su.userid = xu.uid |
|
| 32 | WHERE xu.uid IN (1)'; |
|
| 33 | $result = $xoopsDB->queryF($sql); |
|
| 34 | while ($row = $xoopsDB->fetchArray($result)) { |
|
| 35 | $data[] = $row; |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| 39 | /** |
|
| 40 | * Get arry of users being inspected |
|
| @@ 62-69 (lines=8) @@ | ||
| 59 | * @param int $userid |
|
| 60 | * @return void |
|
| 61 | */ |
|
| 62 | public function createUser($userid) |
|
| 63 | { |
|
| 64 | global $xoopsUser, $xoopsDB; |
|
| 65 | $a = new $xoopsUser($userid); |
|
| 66 | $b = $a->uname(); |
|
| 67 | $sql = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_user') . ' (userid) VALUES (' . (int)$userid . ')'; |
|
| 68 | $result = $xoopsDB->queryF($sql); |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @Check is user is smallworld user |
|
| @@ 29-41 (lines=13) @@ | ||
| 26 | /** |
|
| 27 | * @return array |
|
| 28 | */ |
|
| 29 | private function getAdminModerators() |
|
| 30 | { |
|
| 31 | global $xoopsDB, $xoopsUser; |
|
| 32 | $sql = 'SELECT userid |
|
| 33 | FROM ' . $xoopsDB->prefix('smallworld_user') . ' su |
|
| 34 | LEFT JOIN ' . $xoopsDB->prefix('groups_users_link') . ' xu ON su.userid = xu.uid |
|
| 35 | WHERE xu.uid IN (1)'; |
|
| 36 | $result = $xoopsDB->queryF($sql); |
|
| 37 | while ($row = $xoopsDB->fetchArray($result)) { |
|
| 38 | $data[] = $row; |
|
| 39 | } |
|
| 40 | return $data; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param $last |
|