FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » the login procedure
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  the login procedure [message #21003] Mon, 08 November 2004 15:24 Go to next message
johed802 is currently offline  johed802   Sweden
Messages: 24
Registered: September 2004
Karma: 0
Junior Member
Hi,

I'm wondering about the login procedure. I have hacked my fud forum and want to add some functionality. In the users table i added a new column. When the users are logging in, the system is supposed to check this value (from the new column), and based on this approve ot not approve the users request to log in.

My problem is, in what file should I be woking and how do I make a user 'not' log in? This check is supposed to be after the system has checked that login and password is ok. After this, the system will check the value described above. If this has a certain value, the login should be terminated, i.e the user must not be able to get in to the forum by typing in the correct url.

I've done some hacking in the file: login.php.t. I can check the value desribed above and print an error message (and redirect), but the user can still logg in by typing in the url manually...

Any clues?

thnx
/johan
Re: the login procedure [message #21007 is a reply to message #21003] Mon, 08 November 2004 15:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
In the login.php.t there is a section dealing with "login validation" it starts with the following comment "/* Perform check to ensure that the user is allowed to login */" . That block has various authentication checks, this is where your checks should go to.

In the event of failure you need to call error_dialog() function with the title of the error as the 1st param and the message of error as the 2nd. Other params you can copy from existing calls to the function.


FUDforum Core Developer
Re: the login procedure [message #21031 is a reply to message #21007] Tue, 09 November 2004 09:43 Go to previous message
johed802 is currently offline  johed802   Sweden
Messages: 24
Registered: September 2004
Karma: 0
Junior Member
Ok, thanx!

I found this call helpful: ses_delete($usr->sid); Smile

/johan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: A question about FUD API
Next Topic: I need a popup with a list of choices for user profile at register time
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Oct 31 18:08:55 GMT 2024

Total time taken to generate the page: 0.03135 seconds