~lss-team/lilsoftstats/trunk

« back to all changes in this revision

Viewing changes to inc/class.securelogin.php

  • Committer: ub3rst4r
  • Date: 2013-12-07 06:17:30 UTC
  • Revision ID: ub3rst4r@users.sourceforge.net-20131207061730-2osecexr2gvzh2xk
uses global to declare global variables instead of $GLOBAL

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
     * @return string Returns error if e-mail address is not found or unable to send e-mail 
180
180
     */
181
181
    public function forgot_password( $email ) {
 
182
        global $site_url;
 
183
 
182
184
        // Trim email and change to lower case
183
185
        $email = strtolower( trim( $email ) );
184
186
 
194
196
        $subject = __( "Your password at " ) . SITE_NAME; 
195
197
        $message = __( "Someone requested that the password be reset for the following account:"  ) . "\r\n\r\n";
196
198
        $message .= __( "Username: "  ) . $this->db->arrayed_result['UserName'] . "\r\n\r\n";
197
 
        $message .= $GLOBALS['site_url'] . "\r\n\r\n";
 
199
        $message .= $site_url . "\r\n\r\n";
198
200
        $message .= __( "If this was a mistake, just ignore this email and nothing will happen."  ) . "\r\n\r\n";
199
201
        $message .= __( "To reset your password, visit the following address:" ) . "\r\n\r\n";
200
 
        $message .= "<". $GLOBALS['site_url'] . "/login.php?action=resetPwd&key=".$rand_key."&login=".rawurlencode($this->db->arrayed_result['UserName']).">\r\n\r\n";
 
202
        $message .= "<". $site_url . "/login.php?action=resetPwd&key=".$rand_key."&login=".rawurlencode($this->db->arrayed_result['UserName']).">\r\n\r\n";
201
203
        $message .= __( "This is an automated response, please do not reply!" ) . "\n";
202
204
 
203
205
        if ( !send_mail( $email, $subject, $message ) )