Loading...
 

Development


Login modification

posts: 2
I already have a web site which requires the user to login with a password and be validated. I want to incoproate Tiki Wiki into this existing site. I want to be able to automatically log the user in with the user and pasword that they used on the main site. I don't mind duplicating users and passwords, but don't want to the user to have to sign on twice. Any ideas??
posts: 2
I've read the docs but unless I'm totally missing something, none apply. I have a system where the user has already logged on with a userid and password. I want them to be able to click on a link to take them to Tiki Wiki and have them automatically logged onto the Tiki Wiki environment with their existing userid/password combination - I don't want to prompt for a 2nd login. My current authentication method does NOT use any of the methods listed as an external authentication method - it is a home grown system..

posts: 97

When I attempt to login, if I mis type my password I get a message saying that I attempted to login more than 20 times.

This ain't true.

Login prob

See the screen capture of the msg I receive on the tiki side


Image



How do we set this feature on our own site so that security is being tightened?


Daniel.


posts: 1 India

One possible solution could be to cURL the Tiki login form at tiki-login_scr.php and then simulate a form submit.

See http://linkas.in/simulatesubmit for step-by-step instructions.


posts: 2

Or you can create a file and take advantage of tikis login for example here I pass the username and pw and page wanted as header when trying to connect to this one.  if page wanted is empty the redirect takes to home. I left out some parts, but there is the most that you need.  And of course you need to verify that the user who wants to login actually exists. if not make either redirect or call die()

This actually works. 

 

example
include_once ('lib\tikilib.php');
if(isset($__POST("username","pwd"){
      try{ authenticate($userName, $pwd)
            //not explaining this part should be straight forward
             redirect();
}else redirect to login.php
}
//look how this is 
function authenticate($userName, $pwd){
  //from tikiuserlib
$userlib = tikilib::lib($libraryname);
$challenge = isset($_REQUEST['challenge']) ? $_REQUEST['challenge'] : false;
        $ret = $userlib->validate_user_tiki($userName, $password, $challenge, false);
        
        if (count($ret) == 3) {
        //echo 'loop';
        $ret[] = null;
        }
        list($isvalid, $requestedUser, $error, $method) = $ret;
        $user = $requestedUser;
        $userInfo = $userlib->get_user_info($user);
        //activate the user
        TikiLib::lib('login')->activateSession($user);
        $userId = TikiLib::lib(get_user_id($user));
               $secret = $userlib->create_user_cookie($userId);
setcookie($user_cookie_site, $secret . '.' . $userId, $tikilib->now + $prefs['remembertime'], $prefs['cookie_path'], $prefs['cookie_domain']) ;
//if everything went fine do a redirect

}

 

 

 


posts: 1
Is the solution given by Mikko working fine, Can I apply it safely.

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.