View ProjeQtOr On
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Login method - ProjeQtOr

Login method

06 Jul 2011 10:00 #1 by Nicolas
Login method was created by Nicolas
I'd like to know how the process of connection work in php code.
I'd like to make a second way to connect users. I've made an sso-like in my applications and i would like to make a link to pass through the connection process with the 'Id' of the user. Some thing like:
http://localhost/projectoria/login.php?id=4 to connect the user who have the Id=4 in table 'user' (in reality I use the Id with sha1 encryption to don't give clear Id in url).


Please Log in or Create an account to join the conversation.

07 Jul 2011 10:34 #2 by Nicolas
Replied by Nicolas on topic RE : Login method
I find a solution. I've change the /tool/loginCheck.php file.
My projectoria application is on url : http://localhost/projectoria
I use another application on url http://localhost/cms. In this application when one user is connected he can click on a link wich contain 2 parameters : first is "change=true" and second is "changeid=xxx" xxx is the user id in table user of database of projectoria. This id is crypted by sha1.
So i change loginCheck like that:
if (array_key_exists('login',$_POST)) {
if (array_key_exists('password',$_POST)) {
if (array_key_exists('change',$_GET)) {
if (array_key_exists('changeid',$_GET)) {
if ($login=="" && $change != "true") {
if ($password=="" && $change != "true") {

$obj=new User();
if($change == "true"){
$crit=array('name'=>$login, 'password'=>md5($password));
function loginOk ($user) {
global $login;
global $change;
$obj=new Parameter();
foreach($objList as $obj) {
if ($obj->parameterCode=='lang') {
} else if ($obj->parameterCode=='defaultProject') {
$prj=new Project($obj->parameterValue);
if ($prj->name!=null and $prj->name!='') {
} else {
} else {
if($change == "true"){
header("Location: http://localhost/projectoria");
echo '<span class="messageOK">';
echo i18n('loginOK');
echo '<div id="validated" name="validated" type="hidden" dojoType="dijit.form.TextBox">OK';
echo '</div>';
echo '</span>';
traceLog("NEW CONNECTED USER '" . $login . "'");

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.040 seconds

Cookies settings


Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.


Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.