<h1 class="page-header">Profile</h1>
<p>
	Username: 
	<?=$this->view->getVar('escaper')->escapeHtml($this->view->getVar('user')->name)?>
	<a href='/profile/username'>edit</a>
</p>

<p>
	Password <a href='/profile/password'>edit</a>
</p>

<p>
	<label>Emails: </label><br />
<?=$this->partial('partials/messages')?>
	<ul>
<? foreach ($this->view->getVar('user')->getEmails() as $email) { ?>
		<li>
			<?=$email->email?>
			<?=$email->is_primary ? '<i style=\'color:green\'>primary</i>' : ''?>
			<?=$email->verified ? '' : '<i style=\'color:red\'>not verified</i>'?>
			<?=$email->verified && !$email->is_primary ? "<a href='/profile/setprimaryemail/?id=$email->id'>set primary</a>" : ''?>
			<?=!$email->is_primary ? '' : "<a href='/profile/deleteemail/?id=$email->id'>delete</a>"?>
		</li>
<? } ?>
			<li>
				<a href='/profile/email'>Add new email</a>
			</li>
	</ul>
</p>

<h1 class="page-header">Profile</h1>
<p>
	Username: 
	<?=$this->view->getVar('escaper')->escapeHtml($this->view->getVar('user')->name)?>
	<a href='/profile/username'>edit</a>
</p>

<p>
	Password <a href='/profile/password'>edit</a>
</p>

<p>
	<label>Emails: </label><br />
<?=$this->partial('partials/messages')?>
	<ul>
<? foreach ($this->view->getVar('user')->getEmails() as $email) { ?>
		<li>
			<?=$email->email?>
			<?=$email->is_primary ? '<i style=\'color:green\'>primary</i>' : ''?>
			<?=$email->verified ? '' : '<i style=\'color:red\'>not verified</i>'?>
			<?=$email->verified && !$email->is_primary ? "<a href='/profile/setprimaryemail/?id=$email->id'>set primary</a>" : ''?>
			<?=$email->is_primary ? '' : "<a href='/profile/deleteemail/?id=$email->id'>delete</a>"?>
		</li>
<? } ?>
			<li>
				<a href='/profile/email'>Add new email</a>
			</li>
	</ul>
</p>

Implement helper for custom messages.
GH81: Implement helper for custom messages.

Fixed comments after review.
