XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
AuthAbstract.php
Go to the documentation of this file.
1
<?php
2
/*
3
You may not change or alter any portion of this comment or credits
4
of supporting developers from this source code or any supporting source code
5
which is considered copyrighted (c) material of the original comment or credit authors.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
namespace
Xoops\Auth
;
13
25
abstract
class
AuthAbstract
26
{
30
protected
$dao
;
31
35
protected
$errors
;
36
40
protected
$auth_method
;
41
47
public
function
__construct
(
$dao
)
48
{
49
$this->dao =
$dao
;
50
}
51
60
abstract
public
function
authenticate
(
$uname
, $pwd = null);
61
70
public
function
setErrors
($err_no, $err_str)
71
{
72
$this->errors[$err_no] = trim($err_str);
73
}
74
80
public
function
getErrors
()
81
{
82
return
$this->errors
;
83
}
84
90
public
function
getHtmlErrors
()
91
{
92
$xoops
=
\Xoops::getInstance
();
93
$ret =
'<br />'
;
94
if
(
$xoops
->getConfig(
'debug_mode'
) == 1 ||
$xoops
->getConfig(
'debug_mode'
) == 2) {
95
if
(!empty($this->errors)) {
96
foreach
($this->errors as $errstr) {
97
$ret .= $errstr .
'<br/>'
;
98
}
99
}
else
{
100
$ret .=
\XoopsLocale::NONE
.
'<br />'
;
101
}
102
$ret .= sprintf(\
XoopsLocale::F_USING_AUTHENTICATION_METHOD
, $this->auth_method);
103
}
else
{
104
$ret .=
\XoopsLocale::E_INCORRECT_LOGIN
;
105
}
106
return
$ret;
107
}
108
}
Xoops\Auth\AuthAbstract
Definition:
AuthAbstract.php:25
Xoops\Auth\AuthAbstract\$auth_method
$auth_method
Definition:
AuthAbstract.php:40
Xoops\Auth\AuthAbstract\$errors
$errors
Definition:
AuthAbstract.php:35
XoopsLocaleEn_US\E_INCORRECT_LOGIN
const E_INCORRECT_LOGIN
Definition:
en_US.php:332
Xoops\Auth\AuthAbstract\__construct
__construct($dao)
Definition:
AuthAbstract.php:47
Xoops\getInstance
static getInstance()
Definition:
Xoops.php:160
Xoops\Auth\AuthAbstract\setErrors
setErrors($err_no, $err_str)
Definition:
AuthAbstract.php:70
Xoops\Auth\AuthAbstract\getErrors
getErrors()
Definition:
AuthAbstract.php:80
Xoops\Auth\AuthAbstract\getHtmlErrors
getHtmlErrors()
Definition:
AuthAbstract.php:90
$xoops
$xoops
Definition:
admin.php:25
XoopsLocaleEn_US\F_USING_AUTHENTICATION_METHOD
const F_USING_AUTHENTICATION_METHOD
Definition:
en_US.php:447
Xoops\Auth\AuthAbstract\authenticate
authenticate($uname, $pwd=null)
XoopsLocaleEn_US\NONE
const NONE
Definition:
en_US.php:858
$uname
$uname
Definition:
checklogin.php:37
Xoops\Auth
Definition:
Ads.php:12
Xoops\Auth\AuthAbstract\$dao
$dao
Definition:
AuthAbstract.php:30
usr64
htdocs
xoops_lib
Xoops
Auth
AuthAbstract.php
Generated on Fri May 22 2015 03:07:05 for XOOPS by
1.8.9.1