protected function setCookie(){if($this->pass and $this->id){$cookied = false;$code = $this->make_hash($this->id,$this->pass);if(!$this->opt['cookie_host'])$this->opt['cookie_host'] = $_SERVER['SERVER_NAME'];if(!headers_sent()){//echo "PHP";$cookied = setcookie($this->opt['cookie_name'],$code,strtotime($this->opt['cookie_time']),$this->opt['cookie_path'],$this->opt['cookie_host']);}else{//Headers have been sent use JavaScript to set cookie$time = intval($this->opt['cookie_time']);echo "<script>";echo 'function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toUTCString()); path=escape("'.$this->opt["cookie_path"].'");}';echo "setCookie('{$this->opt['cookie_name']}','{$code}',{$time})";echo "</script>";$cookied = true;}if ($cookied)$this->report("Cookies have been updated for auto login");else$this->error("Cookies haven't been updated for auto login");}else{$this->error("Info required to set the cookie {$this->opt['cookie_name']} is not available");}}
Hi,
I don't the setCookie() has been modified lately. Like you mentioned you will have the cookie issue on the dev environment which i think you can compensate without altering the source by simply adding the server HTTP_NAME to opt[cookie_host] instead of false.
And as for the SQL script discrepancy i'll look into it, i thought the two script only differed on the group_id column.
Thanks for your input, and if you find any other enhancement or suggestions, feel free to fork and send a pull request on GitHub
--
Project's home page http://ptejada.com/projects/uFlex/
---
You received this message because you are subscribed to the Google Groups "uFlex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uflex+un...@googlegroups.com.
To post to this group, send email to uf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uflex/1de9f4cb-8d33-4225-bc23-c7f10faebbd6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
After further reading/research on the subject of HTTP_HOST vs SERVER_NAME apparently SERVER_NAME is more reliable. Do you want to submit a pull request or should i make the change?
To view this discussion on the web visit https://groups.google.com/d/msgid/uflex/eb43f4d7-a777-49fd-91b6-47d6474fb1bb%40googlegroups.com.