public function testGetAndSetUrl() { $this->user->setUrl('http://www.google.com'); $this->assertEquals('http://www.google.com', $this->user->getUrl()); }
/** * @param User $user * @return Form */ private function _createProfileEditForm($user) { $form = new Form(); $form->add(DisplayField::name('username')->label("Username")->value($user->get('username'))); $form->add(EmailField::name('email')->label("Email")->value($user->get('email'))->required(true)); if (User::$me->isAdmin()) { $form->add(CheckboxField::name('admin')->label("Is admin?")->help("Is this user an admin?")->checked($user->isAdmin())); } // todo add DateField /** $form->add( DateField::name('birthday') ->label("Birthday") ->value($user->get('birthday')) ); */ $password_page = $user->getUrl() . "/changepass"; $form->add(DisplayField::name('changepass')->label("Change Password")->value("Please visit the <a href=\"{$password_page}\">change password</a> page.")); return $form; }
<!--b>Page <?php //echo $pages->getCurrentPage()+1; ?> </b--> <BR> <BR> <ul> <div class = "media"> <?php $y = ""; foreach ($sample as $x) { echo "<h1 style='font-weight:bold;'>" . $x["cname"] . "</h1>"; echo ""; foreach ($x["detail"] as $det) { echo "<ul style=''>"; echo "<a href=" . $user->getUrl() . $det["guid"] . ">"; echo '<img style="float:left;" src=' . $user->getProfileImage()->getUrl($det["guid"]) . 'class="img-rounded tt img_margin" height="40" width="40" alt="40x40" data-src="holder.js/40x40" style="width: 40px; height: 40px;">'; echo "<p style='padding-left:50px'> " . $det["firstname"] . " " . $det["lastname"] . " <br>"; echo $det["title"]; echo "<p></a> </ul></br>"; } echo "<br>"; } ?> </div> </ul> <?php $this->widget('CLinkPager', array('pages' => $pages));