Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Commit

Permalink
2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultjunin committed May 8, 2017
1 parent b35d7be commit 578a997
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions src/STAILEUAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @copyright 2015-2017 STAN-TAb Corp.
* @license https://stantabcorp.com/license
* @link https://stail.eu
* @version 2.0.4
* @version 2.0.5
*/
class STAILEUAccounts{

Expand Down Expand Up @@ -208,9 +208,8 @@ public function login($user, $pass){
/**
* register()
*
* This function perform registration
* @deprecated Support will be dropped BEFORE 1st July 2017 !
*
* @deprecated Major bugs or present !
* @param array username -> The user's useranme
* password -> The user's password
* email -> The user's email (not required)
Expand Down Expand Up @@ -513,11 +512,16 @@ public function getUserRegistredByMe(){
* This function generate the login url
*
* @param string The redirect url
* @param string OPTIONAL A image url
*
* @return string The login url
*/
public function loginForm($redir){
return "https://accounts.stail.eu/login?key=".$this->pkey."&redir=".urlencode($redir);
public function loginForm($redir, $img = NULL){
if($img == NULL){
return "https://accounts.stail.eu/login?key=".$this->pkey."&redir=".$redir;
}else{
return "https://accounts.stail.eu/login?key=".$this->pkey."&redir=".$redir."&img=".$img;
}
}

/**
Expand All @@ -526,11 +530,16 @@ public function loginForm($redir){
* This function generate the register url
*
* @param string The redirect url
* @param string OPTIONAL A image url
*
* @return string The login url
*/
public function registerForm($redir){
return "https://accounts.stail.eu/register?key=".$this->pkey."&redir=".urlencode($redir);
public function registerForm($redir, $img = NULL){
if($img == NULL){
return "https://accounts.stail.eu/register?key=".$this->pkey."&redir=".$redir;
}else{
return "https://accounts.stail.eu/register?key=".$this->pkey."&redir=".$redir."&img=".$img;
}
}

/**
Expand Down Expand Up @@ -561,11 +570,17 @@ public function checkLogin($code){
* This function generate the forgotten password url
*
* @param string The redirect url
* @param string OPTIONAL A image url
*
* @return string The login url
*/
public function forgotForm($redir){
return "https://accounts.stail.eu/forgot?key=".$this->pkey."&redir=".urlencode($redir);
public function forgotForm($redir, $img = NULL){
if($img == NULL){
return "https://accounts.stail.eu/forgot?key=".$this->pkey."&redir=".$redir;
}else{
return "https://accounts.stail.eu/forgot?key=".$this->pkey."&redir=".$redir."&img=".$img;
}

}

}

0 comments on commit 578a997

Please sign in to comment.