Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
chris Rowse
How do I make a user active in 6.0.6
August 19, 2011 3:12 AM
Answer

chris Rowse

Rank: New Member

Posts: 21

Join Date: March 18, 2009

Recent Posts

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.

 1
 2               User user = UserLocalServiceUtil.addUser(creatorUserId, companyId,
 3                autoPassword, password1, password2, autoScreenName, screenName,
 4                emailAddress, facebookId, openId, locale, firstName,
 5                middleName, lastName, prefixId, suffixId, male, birthdayMonth,
 6                birthdayDay, birthdayYear, jobTitle, groupIds, organizationIds,
 7                roleIds, userGroupIds, sendEmail, serviceContext);
 8
 9        registrant.setUserId(user.getUserId());
10        registrant.setContactId(user.getContactId());
11
12                UserLocalServiceUtil.updateActive(user.getUserId(), true);
13
14        updateMobilePhone(creatorUserId, companyId, registrant);
15
16        updateExpandos(companyId, registrant);
Ravi Kumar Gupta
RE: How do I make a user active in 6.0.6
August 19, 2011 4:00 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1146

Join Date: June 23, 2009

Recent Posts

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
Hitoshi Ozawa
RE: How do I make a user active in 6.0.6
August 19, 2011 5:29 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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.
Hitoshi Ozawa
RE: How do I make a user active in 6.0.6
August 19, 2011 6:24 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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.
chris Rowse
RE: How do I make a user active in 6.0.6
August 19, 2011 8:43 AM
Answer

chris Rowse

Rank: New Member

Posts: 21

Join Date: March 18, 2009

Recent Posts

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
How to get the total no of blog post by a single user.....?????
April 12, 2013 12:00 AM
Answer

Ekansh Khandelwal

Rank: New Member

Posts: 15

Join Date: March 6, 2013

Recent Posts

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
RE: How to get the total no of blog post by a single user.....?????
April 12, 2013 12:01 AM
Answer

Ekansh Khandelwal

Rank: New Member

Posts: 15

Join Date: March 6, 2013

Recent Posts

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
RE: How to get the total no of blog post by a single user.....?????
April 12, 2013 12:50 AM
Answer

Roshan Qureshi

Rank: Regular Member

Posts: 143

Join Date: August 24, 2010

Recent Posts

Hi,

You can use

BlogsEntryLocalServiceUtil.getGroupUserEntriesCount() method.

Hope this will help.

Regards,
Roshan Qureshi
Manisha Thote
RE: How to get the total no of blog post by a single user.....?????
April 13, 2013 3:07 PM
Answer

Manisha Thote

Rank: New Member

Posts: 6

Join Date: February 13, 2012

Recent Posts

Hi,

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

Thanks,
Manisha Thote