/** * @param $id * * @return IntouchUser */ public static function getUserById(UserId $uid) { $id = $uid->getId(); $u = User::findOne($id); if (!is_null($u)) { $details = UserInfo::findOne($id); $intouchUser = new IntouchUser($id, $u->email, $u->username, $details->user_name, $details->user_surname, new \DateTime($details->user_birthdate), PhotoService::getProfilePhoto($id), $details->user_education, $details->user_city, $details->user_about); return $intouchUser; } else { return null; } }
<!-- User Account: style can be found in dropdown.less --> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-sign-in"></i> <span class="hidden-xs"><?php echo Yii::t('app', 'Sign in'); ?> </span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header"> <?php echo Html::img(\common\components\PhotoService::getProfilePhoto(0), ['class' => "img-circle"]); ?> <p> <?php echo Yii::t('app', "You're not signed in."); ?> </p> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-left"> <a href="/register" class="btn btn-default btn-flat"><?php echo Yii::t('app', 'Register'); ?> </a>
</a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle navigation</span> </a> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <!-- User Account: style can be found in dropdown.less --> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <!-- <?php echo Html::img(\common\components\PhotoService::getProfilePhoto(0), ['class' => "user-image"]); ?> --> <i class="fa fa-sign-in"></i> <span class="hidden-xs"><?php echo Yii::t('app', 'Account'); ?> </span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header"> <?php echo Html::img($userInfo->getImageUrl(), ['class' => 'img-circle', 'alt' => 'User Image']);