Skip to content

Instantly share code, notes, and snippets.

@WebSofter
Created September 10, 2017 11:31
Show Gist options
  • Save WebSofter/9ac9fc0dac6859e160c015b106aa0fda to your computer and use it in GitHub Desktop.
Save WebSofter/9ac9fc0dac6859e160c015b106aa0fda to your computer and use it in GitHub Desktop.
Joomla:PHP:User:Проверка на регистрацию пользователя #php #joomla
<div class="chat-message-form">
<?php
$user = JFactory::getUser();
if(in_array('2', $user->groups)) { // check for group with id: 2
?>
<form action="#">
<input class="chat-new-message" name="new-message" type="text" placeholder="Напишите сообщение" />
<button class="chat-send-message" id="mod-chat-btn" type="button"></button>
</form>
<?php
}
else {
?>
<a href="./authorize/"><input type="submit" name="Submit" class="button" value="Login"></a>
<?php
}
?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment