projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d353346
)
DataObjects/Core_person.php
author
leon
<leon@roojs.com>
Fri, 25 Aug 2023 02:24:34 +0000
(10:24 +0800)
committer
leon
<leon@roojs.com>
Fri, 25 Aug 2023 02:24:34 +0000
(10:24 +0800)
DataObjects/Core_person.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_person.php
b/DataObjects/Core_person.php
index
083a53d
..
f4a4af7
100644
(file)
--- a/
DataObjects/Core_person.php
+++ b/
DataObjects/Core_person.php
@@
-1656,9
+1656,20
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
function beforeUpdate($old, $q, $roo)
{
- die('a');
$this->email = trim($this->email);
+ $p = DB_DataObject::factory('core_person');
+ if ($roo->authUser->id > -1 || $p->count() > 1) {
+ $pp = DB_DataObject::factory('core_person');
+ $pp->email = trim($this->email);
+ if ($pp->count()){
+ $roo->jerr("that email already exists in the database");
+ }
+
+
+ return;
+ }
+
}
function generateOathKey()