Example #1
0
 /**
  * Render
  */
 public function render()
 {
     $users = new User();
     $users->order('Рейтинг', 'desc');
     $users->limit($this->options->limit);
     if ($result = $users->findAll()) {
         $tpl = new Template('User/templates/widgets/top');
         $tpl->users = $result;
         $this->code = $tpl->render();
     }
     return parent::render();
 }
 public static function allUsers()
 {
     $user = new User();
     $user->order('first_name');
     return $user->fetch();
 }
Example #3
0
 public function showBlockedUsers()
 {
     $this->set_title('Blocked Users');
     #$this->users = User.find(:all, 'select' => "users.*", 'joins' => "JOIN bans ON bans.user_id = users.id", 'conditions' => ["bans.banned_by = ?", current_user()->id])
     $this->users = User::order("expires_at ASC")->select("users.*")->joins("JOIN bans ON bans.user_id = users.id")->take();
     $this->ip_bans = IpBans::all();
 }