Forums de discussion

How do I make a user active in 6.0.6

thumbnail
chris Rowse, modifié il y a 12 années.

How do I make a user active in 6.0.6

New Member Publications: 20 Date d'inscription: 18/03/09 Publications récentes
Hi ,
I am having trouble getting a user to be active.

xxxxx, your account with login xxx@xxxxx.com is not active. Please contact the administrator for more help.


The user does not show up on any of the control panel user lists

When I dump the database, the active flag is 0
When I set it in the database to 1, it reverts to 0 some time later

here is the code I use. There are no exceptions thrown, my log messages show everything is initialized.


               User user = UserLocalServiceUtil.addUser(creatorUserId, companyId,
				autoPassword, password1, password2, autoScreenName, screenName,
				emailAddress, facebookId, openId, locale, firstName,
				middleName, lastName, prefixId, suffixId, male, birthdayMonth,
				birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
				roleIds, userGroupIds, sendEmail, serviceContext);

		registrant.setUserId(user.getUserId());
		registrant.setContactId(user.getContactId());

                UserLocalServiceUtil.updateActive(user.getUserId(), true);

		updateMobilePhone(creatorUserId, companyId, registrant);

		updateExpandos(companyId, registrant);
thumbnail
Ravi Kumar Gupta, modifié il y a 12 années.

RE: How do I make a user active in 6.0.6

Liferay Legend Publications: 1302 Date d'inscription: 24/06/09 Publications récentes
Deactivated users dont appear in the list by default. Search for the user and u will get it. Try advance search in Control Panel > Users > View All
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: How do I make a user active in 6.0.6

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
As an addition, to delete a user, you'll first need to deactive the user and do an advanced search including deactived users and then select and delete the user.
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: How do I make a user active in 6.0.6

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
I just reread the title of the thread. To make a user active again, just search for deactived users and select active to re-active the user.
thumbnail
chris Rowse, modifié il y a 12 années.

RE: How do I make a user active in 6.0.6

New Member Publications: 20 Date d'inscription: 18/03/09 Publications récentes
Hi Ravi and Hitoshi

Thanks for coming back to me so quickly!

a) I had an error in another piece of code (the update) that was setting ACTIVE to FALSE. Ok, Ok, Kick me!.

b) With email vaildations turned on.
My Amazon test server does not like to send emails (Amazon don't want to be a spam hub)
Email validation does do not go out to end users, so they cant activate their accounts.
If this happens, the account is not visible in the list till you change the portal and authentication setup in control panel


Seems email validation is a bit of a waste of time for the server provider on a social site
e.g. a) I set up an email account anywhere (hotmail, yahoo, gmail)
b) I set up my Liferay using this account
c) I validate
d) I change my email to a junk address OR never watch the bit bucket email account I set up in a) again!
So - email validation is purely for the user, not the site owner.

c) I don't know how I can search for an account that is not in the list because I do not know the email address
- What I shall do is to setup a database filter that sends me a list of all inactive accounts

I have solved the problem - Closed
Chris
Ekansh Khandelwal, modifié il y a 11 années.

How to get the total no of blog post by a single user.....?????

New Member Publications: 15 Date d'inscription: 07/03/13 Publications récentes
Hello,
I want to know the total no of blog posted by a single user means.... suppose a user created many blogs in liferay by same User Id, so how can i count the total no of blogs posted by that user....

Please tell me as soon as possible...

Regards,
Ekansh Khandelwal
Ekansh Khandelwal, modifié il y a 11 années.

RE: How to get the total no of blog post by a single user.....?????

New Member Publications: 15 Date d'inscription: 07/03/13 Publications récentes
Ekansh Khandelwal:
Hello,
I want to know the total no of blog posted by a single user means.... suppose a user created many blogs in liferay by same User Id, so how can i count the total no of blogs posted by that user....

Please tell me as soon as possible...

Regards,
Ekansh Khandelwal



Hello,
I want to know the total no of blog posted by a single user means.... suppose a user created many blogs in liferay by same User Id, so how can i count the total no of blogs posted by that user....

Please tell me as soon as possible...

Regards,
Ekansh Khandelwal
Roshan Qureshi, modifié il y a 11 années.

RE: How to get the total no of blog post by a single user.....?????

Regular Member Publications: 159 Date d'inscription: 24/08/10 Publications récentes
Hi,

You can use

BlogsEntryLocalServiceUtil.getGroupUserEntriesCount() method.

Hope this will help.

Regards,
Roshan Qureshi
Manisha Thote, modifié il y a 11 années.

RE: How to get the total no of blog post by a single user.....?????

New Member Publications: 8 Date d'inscription: 13/02/12 Publications récentes
Hi,

Use the following service as,
BlogsEntryLocalServiceUtil.getGroupUserEntriesCount();
This will return the count.

Thanks,
Manisha Thote