1
calvindu
Active Directory authenticated users with 1969/12/31 as the registration date
  • 2011/5/20 21:54

  • calvindu

  • Just popping in

  • Posts: 3

  • Since: 2011/5/17


Hi all,

I am currently using Xoops 2.5.1a with MySQL 5.5 and php 5.3, and I am responsible for setting up a Xoops website that can use active directory for authentication.

I have successfully setup the AD authentication (after a lot of fiddling around), with the option of "Automatic xoops account provisionning". However, when i log in using one of the AD user accounts, I can see in the admin panel that an account is created, but the user registration will always be 1969/12/31, and I'd like for it to be the correct date.

I have poked around quite a bit, and found the xoops_users database's entry for that very user has the column user_regdate empty, so I was certain that was the problem here.

However, after poking around for literally hours in php codes, trying to find how they implemented the insert function, to no avail.

The codes are simply too wrapped up and complicated for me, so I proceeded to see if there's a way to make the xoops_users table to take unix_timestamp() function as default, but it seems like that's impossible, or I'm doing it wrong.

Unfortunately I'm jack of all trades, and not exactly an expert on either php and mysql, so I may be missing something really obvious. I'm really scratching my head over this, so any suggestion is welcome, thanks in advance guys!

Calvin

2
iHackCode
Re: Active Directory authenticated users with 1969/12/31 as the registration date

do you have a user_regdate field in your active directory database?
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

3
calvindu
Re: Active Directory authenticated users with 1969/12/31 as the registration date
  • 2011/5/24 14:02

  • calvindu

  • Just popping in

  • Posts: 3

  • Since: 2011/5/17


Unfortunately, if it's not a standard Windows 2003 domain level user field, I don't think so. Is there any easy/reliable way for me to check that?

4
iHackCode
Re: Active Directory authenticated users with 1969/12/31 as the registration date

i believe you will have to modify auth_provisioning.php (class/auth) and modify the add() method. to set the user_regdate variable . if you have a date field for their registration date then you can convert it, or just use the date when the user is added to the xoops database.

i've never used ldap or active directory before so i hope that helps.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
calvindu
Re: Active Directory authenticated users with 1969/12/31 as the registration date
  • 2011/5/24 16:38

  • calvindu

  • Just popping in

  • Posts: 3

  • Since: 2011/5/17


Thanks a lot, that will at least gives me something to start with, I've been looking all over and couldn't really pin down where the thing is. I'll look into it and will report back how it goes. :)

6
iHackCode
Re: Active Directory authenticated users with 1969/12/31 as the registration date

so how are you doing?
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

170 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 170


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits