To test if any user is logged in, you can use the following
example in your view (items/browse.php) :
<?php $user =
current_user();
if(!$user) : ?>
<p>You need to be registered to view the
content.</p>
<?php else : ?>
<p>Visible content for all logged in users</p>
<?php endif; ?>
<?php $user =
current_user();
if(!$user) : ?>
<p>You need to be registered to view the
content.</p>
<?php else : ?>
<?php if(is_allowed('Items', 'view')) : ?>
<p>Visible content for elevated user roles
(Researcher, Contributor, Admin, Super)</p>
<?php endif ;?>
<p>Visible content for all logged in
users</p>
<?php endif; ?>
I am in Omeka 2.1.4. I would like to use GuestUser to let 'guest' users access to metadata only, but not to archives (images). I understand this is possible by developing a plugin based on GuestUser plugin. Any advise please?
For instance, in Berlin/items/browse.php, how can I ask for 'guest users' and differentiate users to show images or not? What is the best approach to ask for GuestUser to determine if some data is shown or not?. Is there a better solution to have some control on level of access to digital objects?. Many thanks.
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at http://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Omeka Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omeka-dev/L9upcLGQTsI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omeka-dev+...@googlegroups.com.