mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
Merge pull request #611 from openclassify/dia
#1753 [dress-theme] everyscarfs.com eksikler ve buglar ve istekler
This commit is contained in:
commit
29a6799ed4
@ -1,6 +1,7 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule;
|
<?php namespace Visiosoft\AdvsModule;
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||||
|
use Twig_Environment;
|
||||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||||
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
|
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
|
||||||
use Visiosoft\AdvsModule\Adv\Command\GetAd;
|
use Visiosoft\AdvsModule\Adv\Command\GetAd;
|
||||||
@ -87,6 +88,18 @@ class AdvsModulePlugin extends Plugin
|
|||||||
->where('status', 'passive')
|
->where('status', 'passive')
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
),
|
||||||
|
new \Twig_SimpleFunction(
|
||||||
|
'fn',
|
||||||
|
function (Twig_Environment $twig, $name, ...$args) {
|
||||||
|
$fn = $twig->getFunction($name);
|
||||||
|
|
||||||
|
if ($fn === false) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fn->getCallable()(...$args);
|
||||||
|
}, ['needs_environment' => true]
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,4 +33,8 @@ return [
|
|||||||
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
||||||
|
|
||||||
'disable_account' => 'Do you want to close your account? This operation cannot be undone.',
|
'disable_account' => 'Do you want to close your account? This operation cannot be undone.',
|
||||||
|
|
||||||
|
// Mail
|
||||||
|
'update_email_mail_subject' => 'Email Updated!',
|
||||||
|
'update_email_mail_message' => 'Your Email Has Been Updated!',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ trans("visiosoft.module.profile::field.email.name") }}
|
{{ trans("visiosoft.module.profile::field.email.name") }}
|
||||||
</label>
|
</label>
|
||||||
<input value="{{ user.email }}" type="text" disabled class="form-control">
|
{{ userForm.fields.email.input|raw }}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{ userForm.actions|raw }}
|
{{ userForm.actions|raw }}
|
||||||
|
|||||||
@ -16,6 +16,9 @@ class UserFormBuilder extends FormBuilder
|
|||||||
'last_name' => [
|
'last_name' => [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
],
|
],
|
||||||
|
'email' => [
|
||||||
|
'required' => true,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $actions = [
|
protected $actions = [
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
use Anomaly\Streams\Platform\Message\MessageBag;
|
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||||
use Anomaly\UsersModule\User\UserModel;
|
use Anomaly\UsersModule\User\UserModel;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Visiosoft\NotificationsModule\Notify\Notification\UserUpdateEmailMail;
|
||||||
|
|
||||||
class UserFormHandler
|
class UserFormHandler
|
||||||
{
|
{
|
||||||
@ -16,8 +17,14 @@ class UserFormHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$userModel->find(Auth::id())
|
$data = $builder->getPostData();
|
||||||
->update($builder->getPostData());
|
|
||||||
|
$user = $userModel->find(\auth()->id());
|
||||||
|
if ($user->email != $data['email']) {
|
||||||
|
$user->notify(new UserUpdateEmailMail());
|
||||||
|
}
|
||||||
|
|
||||||
|
$user->update($builder->getPostData());
|
||||||
$messages->success(trans('visiosoft.module.profile::message.success_update'));
|
$messages->success(trans('visiosoft.module.profile::message.success_update'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user