how to get all currenly logged-in user ids of anonymous user in drupal 7? - drupal-7

I have planed to create my own simple chat system. I am using wampserver on windowsxp. I need to get all currently logged-in user ids of anonymouse role in drupal 7. Having those ids we can get user names of all currently logged-in users from user table. so how do i get currently logged in user ids?
plase help me some to fix this problem.

"logged-in user ids of anonymous role" by default Drupal assigns 0 as uid for anonymous role.
If you want to display the users who is online currently, Drupal 7 comes with default block, "Who's online" block.
Goto Structure->Blocks and enable it to your preferred region.
and you can try Drupal chat module for chat feature.

Related

Normal user (not admin) registration and publishing in Wagtail

I understand Wagtail is a CMS. Per my test so far, only the admin has permission to publish an article/content. I checked out "puput" and a few others as listed here. I wonder is there a way to allow normal user registration, login, publishing? Something similar to Medium, where the normal user, or say the community, can contribute to the content generation.
I thought there might be a toggle or switch to enable this. But I didn't find it. I'm looking for a way that is either a package or a plugin or similar. Not coding from scratch. Ideally within Wagtail CMS, but other frameworks based on Django should also be fine.
Thanks.
Wagtail provides two user groups:
Editors: user within this group can create page and submit it to moderation
Moderators: user within this group can publish pages that have been submitted to moderation.
To update groups for a given user, go the the django admin interface with admin credentails, usually the url is your-domain/admin
Then go to Users under Authentication and Authorization category
Then get into the user you want to allow posting pages,
Scroll down until Permissions category and moove groups Editors and Moderators from Available groups to Chosen groups as follow:
Then save new settings.

Extract users from two Active Directory groups

I have tried multiple times to get this to work, but I haven't figured it out yet, so I'm asking in here, hoping that someone will be able to help me out.
I am using Atlassian's Bitbucket, Jira and Bamboo and they're all synced with an AD. At the moment I am using my AD user to retrieve all the other users. It works, but it's not optimal, as the password expires every three months, and I have to change the LDAP user login info on all three applications. We have ordered a Service User, where the password doesn't expire, but the problem is that the Service User is in another group.
The picture below shows how the AD is set up. My Service User is in a group called Special Users. I would like to use this user as the login user in the settings. This way I would never have to think about changing password, when my AD password expires.
I would then like to retrieve all the users from the "Normal Users" group.
Let me know if more information is needed.
Thanks.
You could also add multiple user directories pointing to different parts of your Active Directory.
Jira has an internal Crowd out of the box.
You may let Jira connect to User directory and let all other application use Jira for authintication.
This would save time by only updating your LDAP password every 3 months on 1 application and reflected on all 3 applications

Creating user management system in Node js

I have a requirement for hierarchical user management system
where I have 3 hierarchies:
User
Manager
Admin
Now, Admin should be able to get a list as well as edit registrations with role 'User' as well as those with role 'Manager'.
'Manger' should be able to get a list of of registrations with role 'Users' and should be able to edit them.
I had thought of proceeding like:
router.get('/:role',auth.isAuthenticated(),auth.hasRole('admin'), users.findByRole);
where hasRole defines the minimum level of role required to access/edit the data.
However, I do not want a Manager to be able to get the List of admins or edit the list of admins.
It should have access to users list only.
This links suggests using bitwise operatorsbut I am pretty confused with the idea of integrating this piece of code with backend i.e saving and retrieving data from mongo db . Can I please get some pointers?
Look at this project: https://github.com/arthurkao/angular-drywall
This is good MEAN-stack based web app template with user management.

Every user is logged in as the admin user whatever the user role/username

I have a serious login problem with my new (and first ever) Drupal 7 site.
I have two different users so far, which of one is the admin which was created while installing Drupal. If, I log in with the other user's username and password, still, the hovering admin menu will and the menu shows the username of the admin user. This happens, if I log in to both accounts from the same computer, but now I tested the non-admin account from a computer that have never been used to log in the particular site before, and the problem
I am using the current 7.34 core of Drupal 7. The login module is the built-in one of the core.
How is this possible and what can be done about it?
Remove cookies from your browser for this site
Make sure your second user has not admin role.

Joomla Easysocial user auto approvals while registration

I am using Easysocial Extension on my Joomla 3.0 site. i was able to successfully install and integrate it. But when ever a user get register i have to approve them to use the site. And don't want to approve every user, i want it in a auto mode. I have tried to Change the option for "New User Account Activation" to "None" under User Manager but No go. I have searcher for other options in Easysocial but not found any.
Can any one help in resolving this issue.
Do the following:
Login to the admin panel of the Joomla Back-end
Go to: Component > Easysocial > Settings > Profile types
Select your members group
Go to the Registration tab
Select Registration Type and Oauth Registration type (various options are there)
This may work, set these preferences in Joomla users > options
Allow user registration - Yes
New user registration Group - Registered
New User Account activation - Self
User will now need to click an activation link which will then authenticate them.

Resources