erLhcoreClassModelDepartamentGroupUser::getUserGroupsIds PHP Method

getUserGroupsIds() public static method

public static getUserGroupsIds ( $user_id )
    public static function getUserGroupsIds($user_id)
    {
        $db = ezcDbInstance::get();
        $stmt = $db->prepare('SELECT dep_group_id FROM lh_departament_group_user WHERE user_id = :user_id');
        $stmt->bindValue(':user_id', $user_id);
        $stmt->execute();
        return $stmt->fetchAll(PDO::FETCH_COLUMN);
    }

Usage Example

コード例 #1
0
ファイル: edit.tpl.php プロジェクト: remdex/livehelperchat
</h5>
	
		<?php 
if (isset($account_updated_departaments) && $account_updated_departaments == 'done') {
    $msg = erTranslationClassLhTranslation::getInstance()->getTranslation('user/account', 'Account updated');
    ?>
			<?php 
    include erLhcoreClassDesign::designtpl('lhkernel/alert_success.tpl.php');
    ?>
		<?php 
}
?>
		
		<?php 
$userDepartaments = erLhcoreClassUserDep::getUserDepartamentsIndividual($user->id);
$userDepartamentsGroup = erLhcoreClassModelDepartamentGroupUser::getUserGroupsIds($user->id);
?>
		
		<form action="<?php 
echo erLhcoreClassDesign::baseurl('user/edit');
?>
/<?php 
echo $user->id;
?>
#departments" method="post">
		
		    <?php 
include erLhcoreClassDesign::designtpl('lhuser/account/departments_assignment.tpl.php');
?>
		    
		    <input type="submit" class="btn btn-default" name="UpdateDepartaments_account" value="<?php