function getUserByActivationCode($code) { if (StringUtil::IsNullOrEmptyString($code)) { return null; } else { $db = new DB(); $user = new User(); $user = $db->getRow($user, array("activationCode" => $code)); return $user; } }
<!-- Page Content --> <div class="container"> <h1><?php echo $this->category->name; ?> </h1> <div class="row"> <!-- Blog Post Content Column --> <div class="col-lg-8"> <?php foreach ($this->category->posts as $post) { echo ' <div class="well"> <h4><a href=' . URL . 'post/index?id=' . $post->id . '>' . $post->title . '</a></h4> <div> ' . \SKS\UTIL\StringUtil::truncate($post->post, 300) . ' </div> </div> <hr/>'; } ?> </div> <!-- Blog Sidebar Widgets Column --> <div class="col-md-4"> <!-- Blog Search Well --> <div class="well"> <h4>Blog Search</h4> <div class="input-group"> <input type="text" class="form-control"> <span class="input-group-btn">
public function required($data) { if (\SKS\UTIL\StringUtil::IsNullOrEmptyString($data)) { return "field {$data} is required."; } }
function getShortPost() { if ($this->getContainsHTML()) { return ""; } else { return \SKS\UTIL\StringUtil::truncate($this->post, 500); } }