forked from Wavyzz/dolibarr
Lang
This commit is contained in:
@@ -192,7 +192,7 @@ WEBPORTAL_INVOICE_LIST_ACCESS=Enable access to the invoices
|
||||
WEBPORTAL_USER_LOGGED=Select an anonymous user
|
||||
WebPortalUserLoggedHelp=This user is used to update cards
|
||||
WebPortalHomeTitle=Welcome
|
||||
WebPortalHomeDesc=Welcome to the public interface
|
||||
WebPortalHomeDesc=Welcome to your private portal
|
||||
WebPortalPropalListMenu=Proposals
|
||||
WebPortalPropalListTitle=Proposals
|
||||
WebPortalPropalListDesc=You will find here all your proposals
|
||||
|
||||
@@ -277,6 +277,24 @@ class SocieteAccount extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->site == 'dolibarr_portal') {
|
||||
// Check that entry does not already exists
|
||||
$sql = "SELECT sa.rowid, sa.entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_account as sa";
|
||||
$sql .= " WHERE sa.login = '".$this->db->escape($this->login)."'";
|
||||
$sql .= " AND sa.entity IN (".getEntity('societe').")";
|
||||
$sql .= " AND sa.site = 'dolibarr_portal'";
|
||||
$sql .= " ORDER BY sa.rowid DESC"; // To always get the same order
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
if ($this->db->num_rows($result)) {
|
||||
$this->error = 'ErrorLoginAlreadyExists';
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->createCommon($user, $notrigger);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user