wordpress image carousel of logged in user's images - wordpress

How do you have an image carousel show only the logged in user's images? I can upload images to a carousel but can only choose between ALL users' images.

WordPress does not keep information in the database on the logged in status. Logged in user just have a cookie in his browser.
Yoi can use some hook when a user logs in, and maintain this list by yourself in the database. Also, you can use some hook on logout. Additionally, you should use cookie expiration time to make a reasonable estimation if user is still logged in.
It is not so simple and straightforward task.

Related

Accessing BigCommerce Logged In user from wordpress on subdomain

So I need a way to lock down both bigcommerce and wordpress if a user is not logged in. First suggestion was asking if when a user is created in bigcommerce create the same user account in WP... but that doesn't seem like a good approach to me since the user will not need any interaction as a user on WP just need to block access to pages if they are not logged in.
So my thought is to check if a user is logged into bigcommerce, then pass a variable to wp header file. If the variable does not exist then redirect them back to bigcommerce login. For this install BigCommerce is currently using the header from wp so they match and all works well so that is why I assume I should be able to pass a variable to check if a user is logged into bigcommerce or not. I have not been able to find any documentation in the API about accessing if a user is logged in or not.
Has anyone done anything like this and or know if this would be possible? Or know of a better solution for what I am trying to do. Maybe check for a cookie or session?
Recently I did a project where the client wanted to show custom content to bigcommerce loggedin users and block the rest. The best way I found was to check the value of %%GLOBAL_CurrentCustomerFirstName%%. It is "Guest" for non-loggedin users.
you can try this:
localStorage.setItem("user", %%GLOBAL_CurrentCustomerFirstName%% );
and then you can use on wordpress pages :
var user = localStorage.getItem("user");
if(user=="Guest"){
//redirect to login or block page
}
Obviously they can get around javascript so using ajax to store it somewhere and then retrieving it would be more secure but I hope this will help you proceed :)

Automatic Login Facebook PHP SDK as in Wordpress Easy Instagram Plugiin

I am creating a wordpress plugin for admin. In which admin can show his selected photos from facebook album on front end.
App id and secret key are storing in db.
Login also working and it fetches the login user albums etc etc.
and Logout also working. But when on the site if some one has logged-in in my plugin then from any system it must show the login details.
What currently its doing is that to login to facebook, which i don't want.
The method i want in my plugin is same as its in wordpress easy instagram plugin, where in the site if the user logged in then it will always show the login credentials what happening in this instagram plugin is that is stores the access token in wp options table. if we delete the value for that option then it will specify in the back end to login.
I want same process in my plugin too.
Auto login process. (one time login)
Anyone knows how to make this work?
Thanks

Performance Optimisation in asp.net 4

i am creating a site, which is a Library Management system, here there are 2 types of user, Host (SuperUser), Faculty. Now i want to show up menus, these menu should be based on the user logged in, like if SuperUser has logged in, he should be able to see everything, whereas if Faculty has logged in, he/she should be able to see only his/her details, now here i have 3thoughts:
To generate the menu based on the User, from the Database. i mean i would be saving the menu-items in the database and would fetch the menus based on the user logged in Directly code in page so as to enable disable the menu-item based on the user logged in.To generate xml file containing the menus as per user, and fetching menus from there as per the user logged in.
As i want more performance optimisation from my site, which technique would save me performance, or is there any other best way to populate menu's with ease and performance.
Please advice.
Try using a SiteMap: http://msdn.microsoft.com/en-us/library/ms178428(v=VS.100).aspx. It can handle Roles.

retrieve page ids of member without manage page permissions

can anybody tell me if its possible to retrieve a list of a member's pages without manage pages permissions? or if its possible to send the graph a facebook page id and have it return whether or not the current FB user admins the page.
i have a page tab application which a FB user can install to one of their pages, and in order to show the relevant info regarding the current FB user from my website on their facebook page, i need to know that the page they have given me is administered by them.
since i dont want any control over the page itself, only to know that the page id ive received is associated with the current FB user, asking for permissions to log in as any and all of their facebook pages seems like a bit of an excessive permission

Drupal 6 increase user login time

How can I increase time for keeping user logged in.
Even after comming back after few days.
I don't want users to login each time they open a browser.
Look here:
http://drupalmodules.com/module/persistent-login
or search for persistent login or login cookie in the drupal modules site.

Resources